[PATCH] D77527: [AST] Adjust existing tests for recovery-exprs

2020-04-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a reviewer: jdoerfert. Herald added a project: clang. When enabling recovery-expr (in https://reviews.llvm.org/D76696, which has been revertedj), we need to update a few tests to adjust new diagnostic changes. This pat

[PATCH] D77468: [clang] fix undefined behaviour in RawComment::getFormattedText()

2020-04-06 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor accepted this revision. teemperor added a comment. This revision is now accepted and ready to land. We don't usually use alternative operator spelling in Clang, but otherwise this LGTM. I'll land this for you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D77461: [clang-tidy] Remove false positive in AvoidNonConstGlobalVariables

2020-04-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. I expect different style guides to have a different opinion on this, depending on the justification for the rule. > The purpose of the rule is to avoid code which causes hidden dependencies. That's one justification, which would prohibit such static variables. Anoth

[PATCH] D76617: [SveEmitter] Fix encoding/decoding of SVETypeFlags

2020-04-06 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. Cheers, LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76617/new/ https://reviews.llvm.org/D76617 ___ cfe-commits mailin

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-04-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Ping. It is now testable, a sub-checker was added for testing (that can be useful at later improvements too). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75682/new/ https://reviews.llvm.org/D75682 ___

[PATCH] D76996: [analyzer] Improve PlacementNewChecker

2020-04-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp:189 + if (const MemRegion *MRegion = PlaceVal.getAsRegion()) { +if (const ElementRegion *TheElementRegion = +MRegion->getAs()) { The sequence of `Field

[PATCH] D77410: [analyzer] StdLibraryFunctionsChecker: match signature based on FunctionDecl

2020-04-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Excellent! No objections. It should have absolutely been like that from the start: summaries are of functions, not of call sites. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D68554: [clang-format] Proposal for clang-format to give compiler style warnings

2020-04-06 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. I reported a small issue here: https://bugs.llvm.org/show_bug.cgi?id=45441 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68554/new/ https://reviews.llvm.org/D68554 ___

[PATCH] D75431: [analyzer][NFC] Merge checkNewAllocator's paramaters into CXXAllocatorCall

2020-04-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Great, thanks!! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75431/new/ https://reviews.llvm.org/D75431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[PATCH] D77461: [clang-tidy] Remove false positive in AvoidNonConstGlobalVariables

2020-04-06 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Ri-global is in "Interfaces" section, it only covers inter-procedural stuff. Diagnosing function-local static non-const variable is a plain false-positive diagnostic. Repository: rG LLVM

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-04-06 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 255250. abelkocsis added a comment. Small fixes Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[PATCH] D77410: [analyzer] StdLibraryFunctionsChecker: match signature based on FunctionDecl

2020-04-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:553 +QualType ActualT = FD->getParamDecl(I)->getType().getCanonicalType(); assert(ActualT.isCanonical()); if (ActualT != FormalT) This asser

[clang] ad7211d - [clang] fix undefined behaviour in RawComment::getFormattedText()

2020-04-06 Thread Raphael Isemann via cfe-commits
Author: Oliver Bruns Date: 2020-04-06T10:48:25+02:00 New Revision: ad7211df6f257e39da2e5a11b2456b4488f32a1e URL: https://github.com/llvm/llvm-project/commit/ad7211df6f257e39da2e5a11b2456b4488f32a1e DIFF: https://github.com/llvm/llvm-project/commit/ad7211df6f257e39da2e5a11b2456b4488f32a1e.diff

[PATCH] D77532: Fix a typo in clang/lib/Frontend/FrontendAction.cpp

2020-04-06 Thread BoYao Zhang via Phabricator via cfe-commits
rZhBoYao created this revision. rZhBoYao added reviewers: rsmith, harlanhaskins, clang. rZhBoYao added a project: clang. rZhBoYao updated this revision to Diff 255254. rZhBoYao added a comment. revert the change to trailing newlines There is a typo in clang/lib/Frontend/FrontendAction.cpp. Rep

[PATCH] D72326: [clang-format] Rebased on master: Add option to specify explicit config file

2020-04-06 Thread Thibault North via Phabricator via cfe-commits
tnorth added a comment. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72326/new/ https://reviews.llvm.org/D72326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D77468: [clang] fix undefined behaviour in RawComment::getFormattedText()

2020-04-06 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. Landed as ad7211df6f257e39da2e5a11b2456b4488f32a1e Btw, usually patches also need a test (especially if they are less trivial than this one). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D77532: Fix a typo in clang/lib/Frontend/FrontendAction.cpp

2020-04-06 Thread BoYao Zhang via Phabricator via cfe-commits
rZhBoYao updated this revision to Diff 255254. rZhBoYao added a comment. revert the change to trailing newlines Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77532/new/ https://reviews.llvm.org/D77532 Files: clang/lib/Frontend/FrontendAction.cpp

[PATCH] D77468: [clang] fix undefined behaviour in RawComment::getFormattedText()

2020-04-06 Thread Raphael Isemann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGad7211df6f25 (authored by obruns, committed by teemperor). Changed prior to commit: https://reviews.llvm.org/D77468?vs=255059&id=255256#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D75430: [analyzer][NFC] Introduce CXXDeallocatorCall, deploy it in MallocChecker

2020-04-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:59 enum CallEventKind { + CE_CXXDeallocator, CE_Function, I need to move this below `CE_Function`, as i

[PATCH] D77184: Make it possible for lit.site.cfg to contain relative paths, and use it for llvm and clang

2020-04-06 Thread George Rimar via Phabricator via cfe-commits
grimar added a comment. In D77184#1960437 , @thakis wrote: > grimar, andrewng: You both have checkout and build on different drives too, > yes? Nope. I think my configuration is just normal, except I do not use "C:". My checkout is "D:\Work3\LLVM\llvm-p

[PATCH] D77499: [ASTMatchers] Matchers that take enumerations args provide hints with invalid arguments

2020-04-06 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 255258. njames93 added a comment. - Remove format artefacts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77499/new/ https://reviews.llvm.org/D77499 Files: clang/include/clang/ASTMatchers/Dynamic/Diagnostic

[PATCH] D77410: [analyzer] StdLibraryFunctionsChecker: match signature based on FunctionDecl

2020-04-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. LGTM! Maybe its worth glancing over the rest of the code (comments in particular) whether anything would be outdated by this change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77410/ne

[PATCH] D77054: [AArch64][SVE] Add SVE intrinsics for saturating add & subtract

2020-04-06 Thread Kerry McLaughlin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG944e322f8897: [AArch64][SVE] Add SVE intrinsics for saturating add & subtract (authored by kmclaughlin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77054/

[PATCH] D77484: [Vector] Pass VectLib to LTO backend so TLI build correct vector function list

2020-04-06 Thread George Rimar via Phabricator via cfe-commits
grimar added inline comments. Comment at: lld/ELF/Options.td:491 HelpText<"Sample profile file path">; +def lto_vector_library: J<"lto-vector-library=">, + HelpText<"Vector functions library">; You need to update the documentation either (`lld/docs/ld.lld.1`)

[PATCH] D77534: [clangd] DefineOutline: removes static token from static CXXMethodDecl

2020-04-06 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet, hokein. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. njames93 added a project: clang-tools-extra. Removes the `static` token when defining

[PATCH] D77379: [FPEnv] Use single enum to represent rounding mode

2020-04-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 255267. sepavloff added a comment. Updated patch - enhancements of LangOptions.def are moved into separate patch, - fixed some clang-format errors, - added more comments to RoundingMode. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D77379: [FPEnv] Use single enum to represent rounding mode

2020-04-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked an inline comment as done. sepavloff added inline comments. Comment at: llvm/include/llvm/ADT/FloatingPointMode.h:26 +/// assigned to the rounding modes must agree with the values used by FLT_ROUNDS +/// (C11, 5.2.4.2.2p8). +enum class RoundingMode : int8_t { --

[PATCH] D77305: [Analyzer][VLASize] Support multi-dimensional arrays.

2020-04-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. It would be great to see a test about properly setting the arrays extent. Otherwise LGTM. Comment at: clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp:61 + // warned about that already. + // FIXME: report bug? + if (SizeV.isUnknown())

[PATCH] D76617: [SveEmitter] Fix encoding/decoding of SVETypeFlags

2020-04-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
andwar added inline comments. Comment at: clang/utils/TableGen/SveEmitter.cpp:240 + // Returns the SVETypeFlags for the given memory element type. + uint64_t encodeMemoryElementType(unsigned MT) { +return encodeFlag(MT, "MemEltTypeMask"); Shouldn't `MT` be

[PATCH] D75903: [AArch64][CodeGen] Fixing stack alignment of HFA arguments on AArch64 PCS

2020-04-06 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas added a comment. From the AAPCS64's Parameter Passing Rules section (https://github.com/ARM-software/abi-aa/blob/master/aapcs64/aapcs64.rst#642parameter-passing-rules), I believe the proposed handling is correct. The HFA related rules described in this section are: Stage B – Pre-pa

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-04-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM, let's go! Thank you so much for sticking this out! Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:42-51 /// The error state of a stream. + //

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-04-06 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam marked 5 inline comments as done. saiislam added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13630 + + // Map C11/C++11 memory ordering to LLVM memory ordering + switch (static_cast(ord)) { sameerds wrote: > There should no men

[PATCH] D77184: Make it possible for lit.site.cfg to contain relative paths, and use it for llvm and clang

2020-04-06 Thread Andrew Ng via Phabricator via cfe-commits
andrewng added a comment. In D77184#1960437 , @thakis wrote: > grimar, andrewng: You both have checkout and build on different drives too, > yes? Sorry for not replying earlier. Yes, for most of my setups I have the source checkout on one drive and bui

[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-04-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I think situations where we infer M(x) to expand to a "type" without const/volatile close-by are too ambiguous an we will have the opposite problem: formatting certain binary expressions as type pointer/references. Some sort of a list of macros that clang-format assume

[PATCH] D76725: [clangd] Build ASTs only with fresh preambles or after building a new preamble

2020-04-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks for your patience! This is very nice, only +100 lines on TUScheduler.cpp in the end! Comment at: clang-tools-extra/clangd/TUScheduler.cpp:224 + std:

[PATCH] D77502: [clang][CodeGen] Handle throw expression in conditional operator constant folding

2020-04-06 Thread Raul Tambre via Phabricator via cfe-commits
tambre added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:4337 +EmitCXXThrowExpr(ThrowExpr); +return EmitLValue(dead); + } rsmith wrote: > The IR we emit for the dead operand is unreachable; it's a bit wasteful to > generate it

[PATCH] D77502: [clang][CodeGen] Handle throw expression in conditional operator constant folding

2020-04-06 Thread Raul Tambre via Phabricator via cfe-commits
tambre updated this revision to Diff 255275. tambre marked 4 inline comments as done. tambre added a comment. Emit undef lvalue, add throw CHECK to test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77502/new/ https://reviews.llvm.org/D77502 Files

[PATCH] D76617: [SveEmitter] Fix encoding/decoding of SVETypeFlags

2020-04-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 255276. sdesmalen added a comment. Changed `unsigned` -> `uint64_t` for `encodeMemoryElementType` and `encodeMergeType`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76617/new/ https://reviews.llvm.org/D76617 Files: clang/include/clang/Basic/

[PATCH] D76818: [clang-tidy] Add check llvmlibc-implementation-in-namespace.

2020-04-06 Thread Paula Toth via Phabricator via cfe-commits
PaulkaToast added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/ImplementationInNamespaceCheck.cpp:21 + Finder->addMatcher( + decl(hasParent(translationUnitDecl()), unless(linkageSpecDecl())) + .bind("child_of_translation_unit"), -

[PATCH] D76818: [clang-tidy] Add check llvmlibc-implementation-in-namespace.

2020-04-06 Thread Paula Toth via Phabricator via cfe-commits
PaulkaToast updated this revision to Diff 255277. PaulkaToast marked 13 inline comments as done. PaulkaToast added a comment. Addressed njames's and aaron's comments. (: Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76818/new/ https://reviews.llvm.

[PATCH] D76678: [SveEmitter] Add range checks for immediates and predicate patterns.

2020-04-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 255278. sdesmalen marked 3 inline comments as done. sdesmalen added a comment. - Renamed `ImmCheckPredicatePattern` -> `ImmCheck0_31` - Updated tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76678/new/ https://reviews.llvm.org/D76678 Files:

[PATCH] D73242: [WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP

2020-04-06 Thread Eugene Leviant via Phabricator via cfe-commits
evgeny777 added a comment. This needs to be rebased Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:1784 + ImportSummary->getTypeIdSummary(cast(TypeId)->getString()); + if (!TidSummary) +RemoveTypeTestAssumes(); tejohnson wrote:

[PATCH] D76617: [SveEmitter] Fix encoding/decoding of SVETypeFlags

2020-04-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
andwar added a comment. LGTM This patch now implements a bit more than the original commit message would suggest. Could you please update? Thanks for working on this! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76617/new/ https://reviews.llvm.org/D76617 __

[PATCH] D76680: [SveEmitter] Add immediate checks for lanes and complex imms

2020-04-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 255282. sdesmalen added a comment. - Updated tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76680/new/ https://reviews.llvm.org/D76680 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/Basic/arm_sve.td clang/

[PATCH] D77229: [Analyzer][WIP] Avoid handling of LazyCompundVals in IteratorModeling

2020-04-06 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 255279. baloghadamsoftware added a comment. More progress... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77229/new/ https://reviews.llvm.org/D77229 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h clang/incl

[PATCH] D77534: [clangd] DefineOutline: removes static token from static CXXMethodDecl

2020-04-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks for the patch! this is quite similar to handling `kw_virtual` even handling multiple `static` keywords. Could you rather factor the `search for kw, generate an edit to delete specifier` part into a `DelKeyword` lambda similar to `DelAttr` and call it with kw_st

[PATCH] D76996: [analyzer] Improve PlacementNewChecker

2020-04-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp:189 + if (const MemRegion *MRegion = PlaceVal.getAsRegion()) { +if (const ElementRegion *TheElementRegion = +MRegion->getAs()) { NoQ wrote: > The seque

[PATCH] D77229: [Analyzer][WIP] Avoid handling of LazyCompundVals in IteratorModeling

2020-04-06 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 3 inline comments as done. baloghadamsoftware added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:127 + const auto *Init = ICC->getCXXCtorInitializer(); + return getObjectUnderConstruction(State, Init, LCtx); +

[PATCH] D77229: [Analyzer][WIP] Avoid handling of LazyCompundVals in IteratorModeling

2020-04-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Uh-oh, it's annoying indeed that you can't easily obtain the current CFG element from inside a `CallEvent`. Given that every `CallEvent` is in fact associated with a `CFGElement` (but not every `CallEvent` is associated with an `Expr` or have a `Decl`), can we modify the `

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-04-06 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:1888 +// Check valididty of memory ordering as per C11 / C++11's memody model. +if (ord < static_cast(llvm::AtomicOrderingCABI::acquire) || + ord > static_cast(llvm::AtomicOrderingCABI

[PATCH] D75068: libclang: Add static build support for Windows

2020-04-06 Thread Cristian Adam via Phabricator via cfe-commits
cristian.adam added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75068/new/ https://reviews.llvm.org/D75068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D77532: Fix a typo in clang/lib/Frontend/FrontendAction.cpp

2020-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Do you need someone to commit on your behalf? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77532/new/ https://reviews.llvm.

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-04-06 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam updated this revision to Diff 255288. saiislam added a comment. Changes: 1. Moved builtin definition with rest of atomic builtins 2. Updated validity checking of memory order using exact mathches instead of range matching 3. Added a sucessful test case which passes arbitrary string scop

[PATCH] D76678: [SveEmitter] Add range checks for immediates and predicate patterns.

2020-04-06 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. LGTM, please wait a day in case Eli has more comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76678/new/ https://reviews.llvm.org/D76678

[PATCH] D77229: [Analyzer][WIP] Avoid handling of LazyCompundVals in IteratorModeling

2020-04-06 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D77229#1963485 , @NoQ wrote: > Uh-oh, it's annoying indeed that you can't easily obtain the current CFG > element from inside a `CallEvent`. > > Given that every `CallEvent` is in fact associated with a `CFGElement`

[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-04-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. A sample of snippets that this misformats: - inside other macro: EXPECT_EQ(Calc()* bar, baz); - in member function call: BENCHMARK(BM_Foo)->ThreadRange(1, NumCPUs()* 2); - this causes javascript diffs: - const foo = (bar == 'rtl' ? -1 : 1) * (blah || blah || 0

[PATCH] D77542: [PowerPC] Treat 'Z' inline asm constraint as a true memory constraint

2020-04-06 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai created this revision. nemanjai added reviewers: hfinkel, PowerPC. Herald added subscribers: cfe-commits, shchenz, kbarton. Herald added a project: clang. We currently emit incorrect codegen for this constraint because we set it as a constraint that allows registers. This will cause the

[PATCH] D76678: [SveEmitter] Add range checks for immediates and predicate patterns.

2020-04-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D76678#1963576 , @SjoerdMeijer wrote: > LGTM, please wait a day in case Eli has more comments. Will do, thanks Sjoerd! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76678/new/ https://reviews.llvm.org/D76678 _

[PATCH] D77534: [clangd] DefineOutline: removes static token from static CXXMethodDecl

2020-04-06 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 255298. njames93 added a comment. - Moved keyword removing logic into a lambda. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77534/new/ https://reviews.llvm.org/D77534 Files: clang-tools-extra/clangd/refac

[PATCH] D77532: Fix a typo in clang/lib/Frontend/FrontendAction.cpp

2020-04-06 Thread BoYao Zhang via Phabricator via cfe-commits
rZhBoYao added a comment. In D77532#1963551 , @aaron.ballman wrote: > LGTM! Do you need someone to commit on your behalf? Yes, much appreciated! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77532/new/ h

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-04-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/test/Analysis/stream-error.c:1 -// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.unix.Stream -analyzer-checker=debug.ExprInspection -analyzer-store region -verify %s +// RUN: %clang_an

[PATCH] D76384: Move FPFeatures from BinaryOperator bitfields to Trailing storage

2020-04-06 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 255301. mibintc added a comment. I beleive this patch responds to all @rjmccall 's review comments, except I don't know how to program a solution to his StmtVisitor remark. I'll add more info about that. This patch optionally allocates the trailing storage

[PATCH] D76384: Move FPFeatures from BinaryOperator bitfields to Trailing storage

2020-04-06 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. If I change StmtVisitor to send compound assignment opcodes to BinaryOperator, then 12 clang LIT tests fail, all related to compound assignment mishandling, i.e. this patch - a/clang/include/clang/AST/StmtVisitor.h +++ b/clang/include/clang/AST/StmtVisitor.h @@ -143,7

[PATCH] D77545: Represent FP options in AST by special Expression node

2020-04-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, andrew.w.kaylor, efriedma, mibintc, kpn, sammccall, hokein. Herald added a subscriber: martong. Herald added a project: clang. The patch D76599 proposed a new statement node to represe

[PATCH] D76384: Move FPFeatures from BinaryOperator bitfields to Trailing storage

2020-04-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:394 + return true; + } + rjmccall wrote: > sepavloff wrote: > > rjmccall wrote: > > > sepavloff wrote: > > > > erichkeane wrote: > > > > > rjmccall wrote: > > > > > > erichk

[PATCH] D77229: [Analyzer][WIP] Avoid handling of LazyCompundVals in IteratorModeling

2020-04-06 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Another problem: parameters can also be `LazyCompoundVal`s, but `CallEvent::getParameterLocation()` does not handle non-inlined calls. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77229/new/ https://reviews.llvm.org/D77229 ___

[PATCH] D77519: Fix __is_pointer builtin type trait to work with Objective-C pointer types.

2020-04-06 Thread Louis Dionne via Phabricator via cfe-commits
ldionne requested changes to this revision. ldionne added a comment. This revision now requires changes to proceed. Thanks for looking into this! Comment at: clang/test/SemaObjC/type-traits-is-pointer.mm:10 +void test_is_pointer() { +assert_is_pointer(); +

Re: [clang] 8527c1e - Added constraints on cl-options.cu test

2020-04-06 Thread Hans Wennborg via cfe-commits
I'm seeing this failure when trying to build the Windows package for http://llvm.org/builds (yes, it's been a while). Not sure why it hasn't been on the bots (maybe the Windows bots don't build the nvptx target). Anyway, the error comes from "nocudalib" not being a valid clang-cl option. Is it supp

[PATCH] D77540: [PATCH] [ARM]: Armv8.6-a Matrix Mul Asm and Intrinsics Support

2020-04-06 Thread Luke Geeson via Phabricator via cfe-commits
LukeGeeson added a comment. build failures related to linting, unit tests passing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77540/new/ https://reviews.llvm.org/D77540 ___ cfe-commits mailing list c

[PATCH] D77028: Speed up deferred diagnostic emitter

2020-04-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 255315. yaxunl marked an inline comment as done. yaxunl retitled this revision from "[NFC] Refactor DeferredDiagsEmitter and skip redundant visit" to "Speed up deferred diagnostic emitter". yaxunl edited the summary of this revision. yaxunl added a comment. Re

[PATCH] D77548: clang-format: [JS] handle pseudo-keywords.

2020-04-06 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. mprobst added a reviewer: krasimir. Herald added a project: clang. Herald added a subscriber: cfe-commits. The previous change in https://reviews.llvm.org/D77311 attempted to detect more C++ keywords. However it also precisely detected all JavaScript keywords. That's

[clang-tools-extra] 9e1af17 - [OpenMP][FIX] Add missing cmake dependence needed after 931c0cd713ee

2020-04-06 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2020-04-06T09:01:43-05:00 New Revision: 9e1af172eec9a06bffac337057a2452b88466288 URL: https://github.com/llvm/llvm-project/commit/9e1af172eec9a06bffac337057a2452b88466288 DIFF: https://github.com/llvm/llvm-project/commit/9e1af172eec9a06bffac337057a2452b88466288.d

[clang] f8e1fc2 - Make clang/test/Driver/cl-options.cu pass in 32-bit builds

2020-04-06 Thread Hans Wennborg via cfe-commits
Author: Hans Wennborg Date: 2020-04-06T16:04:43+02:00 New Revision: f8e1fc20cb3984faf62cdd947e4d1a408a9000d8 URL: https://github.com/llvm/llvm-project/commit/f8e1fc20cb3984faf62cdd947e4d1a408a9000d8 DIFF: https://github.com/llvm/llvm-project/commit/f8e1fc20cb3984faf62cdd947e4d1a408a9000d8.diff

Re: [clang] 8527c1e - Added constraints on cl-options.cu test

2020-04-06 Thread Hans Wennborg via cfe-commits
Oh no, the warning is a red herring. The problem is I'm doing a 32-bit build and the triple is nvptx-nvidia-cuda, not nvptx64-nvidia-cuda. f8e1fc20cb3 should fix. On Mon, Apr 6, 2020 at 3:54 PM Hans Wennborg wrote: > > I'm seeing this failure when trying to build the Windows package for > http:/

Re: [clang-tools-extra] 9e1af17 - [OpenMP][FIX] Add missing cmake dependence needed after 931c0cd713ee

2020-04-06 Thread Roman Lebedev via cfe-commits
This seems suspicious. Does clang-reorder-fields actually explicitly needs something from FrontendOpenMP? If not, it looks like there dependency is missing elsewhere, or there's wrong layering. On Mon, Apr 6, 2020 at 5:03 PM Johannes Doerfert via cfe-commits wrote: > > > Author: Johannes Doerfert

Re: [clang-tools-extra] 9e1af17 - [OpenMP][FIX] Add missing cmake dependence needed after 931c0cd713ee

2020-04-06 Thread Johannes Doerfert via cfe-commits
On 4/6/20 9:06 AM, Roman Lebedev wrote: This seems suspicious. Agreed, especially since this is also not the only place. I was hoping to unblock the builders with this. Does clang-reorder-fields actually explicitly needs something from FrontendOpenMP? If not, it looks like there dependency

Re: [clang-tools-extra] 9e1af17 - [OpenMP][FIX] Add missing cmake dependence needed after 931c0cd713ee

2020-04-06 Thread Roman Lebedev via cfe-commits
On Mon, Apr 6, 2020 at 5:23 PM Johannes Doerfert wrote: > > On 4/6/20 9:06 AM, Roman Lebedev wrote: > > This seems suspicious. > > > Agreed, especially since this is also not the only place. > > I was hoping to unblock the builders with this. > > > Does clang-reorder-fields actually explicitly nee

[PATCH] D76384: Move FPFeatures from BinaryOperator bitfields to Trailing storage

2020-04-06 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. It seems like the macro's in StmtVisitor.h only work if CAO and BinaryOperator are separate classes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76384/new/ https://reviews.llvm.org/D76384 _

[PATCH] D76130: [PPC][AIX] Implement variadic function handling in LowerFormalArguments_AIX

2020-04-06 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA updated this revision to Diff 255321. ZarkoCA added a comment. Rebase and ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76130/new/ https://reviews.llvm.org/D76130 Files: llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/test/CodeG

[PATCH] D77209: [Syntax] Add mapping from spelled to expanded tokens for TokenBuffer

2020-04-06 Thread Marcel Hlopko via Phabricator via cfe-commits
hlopko updated this revision to Diff 255326. hlopko marked 4 inline comments as done. hlopko added a comment. Adressing comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77209/new/ https://reviews.llvm.org/D77209 Files: clang/include/clang/

[PATCH] D76360: [PPC][AIX] Emit correct Vaarg for 32BIT-AIX in clang

2020-04-06 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA updated this revision to Diff 255323. ZarkoCA added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76360/new/ https://reviews.llvm.org/D76360 Files: clang/lib/Basic/Targets/PPC.h clang/lib/CodeGen/TargetInfo.cpp cla

[PATCH] D77499: [ASTMatchers] Matchers that take enumerations args provide hints with invalid arguments

2020-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. Thank you for working on this, I think it's very useful functionality! I'd appreciate seeing some unit test coverage for these changes. Comment at: clang/lib/ASTMatchers/Dynamic/CMakeLists.txt:17

[PATCH] D77209: [Syntax] Add mapping from spelled to expanded tokens for TokenBuffer

2020-04-06 Thread Marcel Hlopko via Phabricator via cfe-commits
hlopko marked an inline comment as done. hlopko added a comment. Adressing comments. Comment at: clang/lib/Tooling/Syntax/Tokens.cpp:264 + auto *FrontMapping = mappingStartingBeforeSpelled(File, &Spelled.front()); + unsigned SpelledFrontI = &Spelled.front() - File.SpelledToke

[PATCH] D77551: [analyzer] Fix NSErrorChecker false positives

2020-04-06 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko created this revision. vsavchenko added reviewers: NoQ, dcoughlin. Herald added subscribers: cfe-commits, ASDenysPetrov, martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. NSErrorChecker u

[PATCH] D77548: clang-format: [JS] handle pseudo-keywords.

2020-04-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! The linter suggests a few formatting fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77548/new/ https://reviews.llvm.org/D7

[PATCH] D77507: [clangd] Fix HitMapping assertion in Tokens.cpp

2020-04-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for tracking this down. Unfortunately I don't think removing the assertion is enough, the code doesn't handle this case correctly. Comment at: clang/unittests/Tooling/Syntax/TokensTest.cpp:487 )"}, + // Baseline case, bugz: https://bugs.

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-04-06 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13651 + llvm::getConstantStringInfo(Scope, scp); + SSID = getLLVMContext().getOrInsertSyncScopeID(scp); + saiislam wrote: > sameerds wrote: > > This seems to be creating a new I

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 255341. fhahn added a comment. Update standard conversion wording as suggested by @rjmccall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76612/new/ https://reviews.llvm.org/D76612 Files: clang/docs/LanguageEx

[PATCH] D77507: [clangd] Fix HitMapping assertion in Tokens.cpp

2020-04-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Oh dear, this seems like a design bug. TokenBuffer only attempts to record "top-level" expansions, i.e. `FOO(BAR(BAZ))` will record the expansion of FOO, and say the tokens `FOO ( BAR ( BAZ ) )` were expanded into `some other thing` in an essentially-opaque way. The p

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-04-06 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 255347. danielkiss added a reviewer: tamas.petz. danielkiss added a comment. Fix review comments from Tamas. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75181/new/ https://reviews.llvm.org/D75181 Files: clang/lib/CodeGen/CGCall.cpp clang/l

[clang] ab1fad8 - [analyzer] StdLibraryFunctionsChecker: Add test for function with default parameter

2020-04-06 Thread Gabor Marton via cfe-commits
Author: Gabor Marton Date: 2020-04-06T17:08:58+02:00 New Revision: ab1fad8a3a8b8e3264c34448205061add013b8d7 URL: https://github.com/llvm/llvm-project/commit/ab1fad8a3a8b8e3264c34448205061add013b8d7 DIFF: https://github.com/llvm/llvm-project/commit/ab1fad8a3a8b8e3264c34448205061add013b8d7.diff

[clang] 9220150 - clang-format: [JS] handle pseudo-keywords.

2020-04-06 Thread Martin Probst via cfe-commits
Author: Martin Probst Date: 2020-04-06T17:13:04+02:00 New Revision: 92201505cdecd8ba5795f5e33821c49dc57f0816 URL: https://github.com/llvm/llvm-project/commit/92201505cdecd8ba5795f5e33821c49dc57f0816 DIFF: https://github.com/llvm/llvm-project/commit/92201505cdecd8ba5795f5e33821c49dc57f0816.diff

[clang] 8f96139 - [analyzer] StdLibraryFunctionsChecker: match signature based on FunctionDecl

2020-04-06 Thread Gabor Marton via cfe-commits
Author: Gabor Marton Date: 2020-04-06T17:34:08+02:00 New Revision: 8f961399739f539cb0b3c9ac68ca1b62c2a17a80 URL: https://github.com/llvm/llvm-project/commit/8f961399739f539cb0b3c9ac68ca1b62c2a17a80 DIFF: https://github.com/llvm/llvm-project/commit/8f961399739f539cb0b3c9ac68ca1b62c2a17a80.diff

[PATCH] D77028: Speed up deferred diagnostic emitter

2020-04-06 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thank you. Minor request, but feel free to commit with that change. Comment at: clang/lib/Sema/Sema.cpp:1558 +// visited before. +if (Done.count(FD)) + retu

[PATCH] D77393: [X86] Fix implicit sign conversion warnings in X86 headers.

2020-04-06 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. @craig.topper Any comments? Hopefully we can add extra tests as time goes on (for instance I'm intending to add Wdocumentation test coverage for PR35949). Comment at: clang/test/Headers/x86-header-warnings.c:12 +void test() { + // CHECK-NOT: warning:

[PATCH] D77520: Treat default values in LangOptions.def in the scope of enums

2020-04-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk requested changes to this revision. rnk added a comment. This revision now requires changes to proceed. I don't think we can do this because GCC 5.1 won't support it. To confirm, that's still the minimum supported version: https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compil

[PATCH] D77058: [Clang] Add llvm.loop.unroll.disable to loops with -fno-unroll-loops.

2020-04-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. ping. @tejohnson are you happy with this approach, given that it sounds good to @dexonsmith as well? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77058/new/ https://reviews.llvm.org/D77058 __

[PATCH] D75453: [Driver][ARM] fix undefined behaviour when checking architecture version

2020-04-06 Thread Jan Ole Hüser via Phabricator via cfe-commits
j0le updated this revision to Diff 255354. j0le added a comment. I added a test case. I hope the folder "clang/tests/Driver" is the right one. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75453/new/ https://reviews.llvm.org/D75453 Files: clang/lib/Driver/ToolChains/Clang.cpp clang

[PATCH] D77209: [Syntax] Add mapping from spelled to expanded tokens for TokenBuffer

2020-04-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/lib/Tooling/Syntax/Tokens.cpp:264 + auto *FrontMapping = mappingStartingBeforeSpelled(File, &Spelled.front()); + unsigned SpelledFrontI = &Spelled.front() - File.SpelledTokens.data(); + unsigned ExpandedBegin; ---

[PATCH] D76932: [AIX] emit .extern and .weak directive linkage

2020-04-06 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added a comment. Thanks for splitting the test case. I think it helps a lot for reading and maintainability. Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1490 continue; GlobalValue::VisibilityTypes V = F.getVisibility(); + This l

  1   2   3   4   >