[clang] e4422ae - Rewrite the non-trivial structs section of the ARC spec.

2020-03-05 Thread John McCall via cfe-commits
Author: John McCall Date: 2020-03-06T02:51:45-05:00 New Revision: e4422ae0f6e4159a8560514ce221306c30a7f2c1 URL: https://github.com/llvm/llvm-project/commit/e4422ae0f6e4159a8560514ce221306c30a7f2c1 DIFF: https://github.com/llvm/llvm-project/commit/e4422ae0f6e4159a8560514ce221306c30a7f2c1.diff L

[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

2020-03-05 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 248654. mwyman marked 4 inline comments as done. mwyman added a comment. Updated per review feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75569/new/ https://reviews.llvm.org/D75569 Files: clang-tool

[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

2020-03-05 Thread Michael Wyman via Phabricator via cfe-commits
mwyman marked an inline comment as done. mwyman added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/MethodUnavailableNotOverrideCheck.cpp:80 +void MethodUnavailableNotOverrideCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().ObjC) +return;

[PATCH] D75716: [clangd] Have visibleNamespaces() and getEligiblePoints() take a LangOptions rather than a FormatStyle

2020-03-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks for doing this! Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1378 Scopes.AccessibleScopes = -visibleNamespaces(Content.take_front(Offse

[PATCH] D75723: [X86] Make intrinsics _BitScan* not limited to Windows

2020-03-05 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/include/clang/Basic/BuiltinsX86.def:1904 +// BITSCAN +TARGET_BUILTIN(_BitScanForward, "UcUNi*UNi", "n", "") +TARGET_BUILTIN(_BitScanReverse, "UcUNi*UNi", "n", "") The N specifier here is sort of MSVC mode spec

[PATCH] D75723: [X86] Make intrinsics _BitScan* not limited to Windows

2020-03-05 Thread Kan Shengchen via Phabricator via cfe-commits
skan updated this revision to Diff 248652. skan added a comment. Format the patch due to the warning given by pre-merge check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75723/new/ https://reviews.llvm.org/D75723 Files: clang/include/clang/Bas

[PATCH] D75723: [X86] Make intrinsics _BitScan* not limited to Windows

2020-03-05 Thread Kan Shengchen via Phabricator via cfe-commits
skan updated this revision to Diff 248650. skan added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75723/new/ https://reviews.llvm.org/D75723 Files: clang/include/clang/Basic/BuiltinsX86.def clang/include/clang/Basic/Built

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. FWIW i'm personally still unconvinced this is fixing a real problem Comment at: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.cpp:43-45 +llvm::errs() +<< "Using ',' as a file extension delimiter is deprecated. Please " +

[PATCH] D72860: [modules] Do not cache invalid state for modules that we attempted to load.

2020-03-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Serialization/ModuleManager.cpp:183 // Get a buffer of the file and close the file descriptor when done. - Buf = FileMgr.getBufferForFile(NewModule->File, /*isVolatile=*/false); + Buf = FileMgr.getBufferForFile(

[PATCH] D75723: [X86] Make intrinsics _BitScan* not limited to Windows

2020-03-05 Thread Kan Shengchen via Phabricator via cfe-commits
skan created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently if we want to use _BitScan*, we have to include intrin.h, which can only be included on Windows. Intrinsics _BitScan* are implemented by LLVM IR, so the restriction doesn't make sense. Re

[PATCH] D72875: [clang][cmake] Include generated rst files in html built by docs-clang-html target

2020-03-05 Thread Tom Stellard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG87d8ae700b80: [clang][cmake] Include generated rst files in html built by docs-clang-html… (authored by tstellar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[clang-tools-extra] 45e2c6d - [clang-tools-extra/clang-tidy] Mark modernize-make-shared as offering fixes

2020-03-05 Thread Jonas Devlieghere via cfe-commits
Author: Jonas Devlieghere Date: 2020-03-05T21:45:20-08:00 New Revision: 45e2c6d956141618683d31a683d762aaf0e7168d URL: https://github.com/llvm/llvm-project/commit/45e2c6d956141618683d31a683d762aaf0e7168d DIFF: https://github.com/llvm/llvm-project/commit/45e2c6d956141618683d31a683d762aaf0e7168d.d

[clang] 87d8ae7 - [clang][cmake] Include generated rst files in html built by docs-clang-html target

2020-03-05 Thread Tom Stellard via cfe-commits
Author: Tom Stellard Date: 2020-03-05T21:30:37-08:00 New Revision: 87d8ae700b80d58d69bb92b601f946f02f089398 URL: https://github.com/llvm/llvm-project/commit/87d8ae700b80d58d69bb92b601f946f02f089398 DIFF: https://github.com/llvm/llvm-project/commit/87d8ae700b80d58d69bb92b601f946f02f089398.diff

[PATCH] D72860: [modules] Do not cache invalid state for modules that we attempted to load.

2020-03-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked an inline comment as done. vsapsai added inline comments. Comment at: clang/lib/Serialization/ModuleManager.cpp:183 // Get a buffer of the file and close the file descriptor when done. - Buf = FileMgr.getBufferForFile(NewModule->File, /*isVolatile=*/fal

Re: [clang] bdad0a1 - PR45083: Mark statement expressions as being dependent if they appear in

2020-03-05 Thread Richard Smith via cfe-commits
I implemented a completely different fix in a95cc77be154433c37a3110ac9af394b7447fcba. Please can you let me know if it works out? The old approach was to treat statement expressions as being value- and instantiation-dependent if they appear in a dependent context (matching GCC's apparent behavior)

[clang] a95cc77 - PR45083: Mark statement expressions as being dependent if they contain

2020-03-05 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-03-05T19:03:05-08:00 New Revision: a95cc77be154433c37a3110ac9af394b7447fcba URL: https://github.com/llvm/llvm-project/commit/a95cc77be154433c37a3110ac9af394b7447fcba DIFF: https://github.com/llvm/llvm-project/commit/a95cc77be154433c37a3110ac9af394b7447fcba.diff

[PATCH] D75719: [clang][Headers] Use __has_builtin instead of _MSC_VER.

2020-03-05 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese created this revision. Bigcheese added reviewers: compnerd, kongyi. Bigcheese added a project: clang. Herald added subscribers: danielkiss, dexonsmith, kristof.beyls. arm_acle.h relied on `_MSC_VER` to determine if a given function was already defined as a builtin. This was incorrect bec

[PATCH] D75560: Make Decl:: setOwningModuleID() public. (NFC)

2020-03-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. I'm surprised so few setters needed to be made public for this to work. If this required making lots more setters public, I'd be concerned, because we generally don't want large chunks of the

[PATCH] D64464: [CodeGen] Emit destructor calls to destruct compound literals

2020-03-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:4100 + if (E->getType().isDestructedType() == QualType::DK_nontrivial_c_struct) +pushDestroy(QualType::DK_nontrivial_c_struct, DeclPtr, E->getType()); + ahatanak wrote: > rjmccall wrote: > >

[PATCH] D64464: [CodeGen] Emit destructor calls to destruct compound literals

2020-03-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:4100 + if (E->getType().isDestructedType() == QualType::DK_nontrivial_c_struct) +pushDestroy(QualType::DK_nontrivial_c_struct, DeclPtr, E->getType()); +

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:489 + Index->fuzzyFind(Req, [&](const Symbol &Sym) { +auto MaybeDeclLoc = +symbolLocationToLocation(Sym.CanonicalDeclaration, MainFilePath);

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added a comment. In D72874#1900648 , @sammccall wrote: > This reminds me: it's not completely obvious what set of "act on symbol under > the cursor" things this should (eventually) apply to. > I think not h

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 248630. nridge marked 16 inline comments as done. nridge added a comment. Rebase onto D75479 and address most review comments Comments remaining to be addressed: - revising the tests to exercise locateSymbolNamedTextuallyAt(

[PATCH] D75479: [clangd] go-to-def on names in comments etc that are used nearby.

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Here's a test case that gives a less desirable result with this approach than D72874 : struct Foo { void uniqueMethodName(); }; struct Bar { void uniqueMethodName(); }; // Will call u^niqueMethodName() on t. template

[PATCH] D75716: [clangd] Have visibleNamespaces() and getEligiblePoints() take a LangOptions rather than a FormatStyle

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. These functions only use the FormatStyle to obtain a LangOptions via format::getFormattingLangOpts(), and some callers can more easil

[PATCH] D64464: [CodeGen] Emit destructor calls to destruct compound literals

2020-03-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. This patch looks good except for that C/C++ semantic difference. A compound literal temporary can be lifetime-extended in C++, but only in the standard way of binding a reference to it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D72875: [clang][cmake] Include generated rst files in html built by docs-clang-html target

2020-03-05 Thread Dan Liew via Phabricator via cfe-commits
delcypher accepted this revision. delcypher added a comment. This revision is now accepted and ready to land. LGTM. Thanks for addressing all the issues I raised. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72875/new/ https://reviews.llvm.org/D72

[PATCH] D64464: [CodeGen] Emit destructor calls to destruct compound literals

2020-03-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:4100 + if (E->getType().isDestructedType() == QualType::DK_nontrivial_c_struct) +pushDestroy(QualType::DK_nontrivial_c_struct, DeclPtr, E->getType()); + ahatanak wrote: > rjmccall wrote: > >

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75714 Files: clang/include/clang/Basic/Diagnostic.h Index: clang/include/clang/Basic/Diagnostic.h ===

[clang-tools-extra] dcba401 - Fix 45129: Incorrect generated configuration modernize-make-shared.IncludeStyle

2020-03-05 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2020-03-06T00:07:08Z New Revision: dcba401a39d7f3c915fdea4a220380e07fe965a3 URL: https://github.com/llvm/llvm-project/commit/dcba401a39d7f3c915fdea4a220380e07fe965a3 DIFF: https://github.com/llvm/llvm-project/commit/dcba401a39d7f3c915fdea4a220380e07fe965a3.diff LOG:

[PATCH] D75560: Make Decl:: setOwningModuleID() public. (NFC)

2020-03-05 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl marked an inline comment as done. aprantl added inline comments. Comment at: clang/include/clang/AST/DeclBase.h:629-630 +public: + void setFromASTFile() { FromASTFile = true; } + rsmith wrote: > Setting this after creating a `Decl` is not safe in gener

[PATCH] D75560: Make Decl:: setOwningModuleID() public. (NFC)

2020-03-05 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 248618. aprantl added a comment. I took your suggestion to heart and changed the downstream LLDB patch to use CreateDeserialized() everywhere, which is frankly a better fit there anyway. To make this possible I had to make a few more setters public, see the

[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

2020-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/MethodUnavailableNotOverrideCheck.cpp:47-49 + auto Iter = + std::find(Macros.begin(), Macros.end(), Tok.getRawIdentifier().str()); + return Iter != Macros.end(); `return llvm::i

[PATCH] D74935: [LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects

2020-03-05 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D74935#1908607 , @jeroen.dobbelaere wrote: > [...] > So, adding the 'noalias' attribute to %pA and %pB will change the behavior > of foo(). > > hmm... this explanation is maybe getting too long ? > The short conclusion sho

[PATCH] D75708: Add warnings for casting ptr -> smaller int for C++ in Microsoft mode

2020-03-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Thanks, looks good! I'll push it in a sec. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75708/new/ https://reviews.llvm.org/D75708 ___

[PATCH] D75708: Add warnings for casting ptr -> smaller int for C++ in Microsoft mode

2020-03-05 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcfff4851acc5: Add warnings for casting ptr -> smaller int for C++ in Microsoft mode (authored by aeubanks, committed by rnk). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D75708: Add warnings for casting ptr -> smaller int for C++ in Microsoft mode

2020-03-05 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 248614. aeubanks added a comment. - Format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75708/new/ https://reviews.llvm.org/D75708 Files: clang/lib/Sema/SemaCast.cpp clang/test/SemaCXX/MicrosoftExtension

[clang] cfff485 - Add warnings for casting ptr -> smaller int for C++ in Microsoft mode

2020-03-05 Thread Reid Kleckner via cfe-commits
Author: Arthur Eubanks Date: 2020-03-05T15:17:06-08:00 New Revision: cfff4851acc5132c8dcaebca6af92f817e133d66 URL: https://github.com/llvm/llvm-project/commit/cfff4851acc5132c8dcaebca6af92f817e133d66 DIFF: https://github.com/llvm/llvm-project/commit/cfff4851acc5132c8dcaebca6af92f817e133d66.diff

[PATCH] D75700: [NFC] Let mangler accept GlobalDecl

2020-03-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1028 else - MC.mangleName(ND, Out); + MC.mangleName(GD, Out); } else { What would be necessary in order for this to turn into just `mangleName(GD, Out)`? I suspec

[PATCH] D72875: [clang][cmake] Include generated rst files in html built by docs-clang-html target

2020-03-05 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72875/new/ https://reviews.llvm.org/D72875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

2020-03-05 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 248611. mwyman added a comment. Don't provide fix-it hints when the unavailable attribute is inside a macro, unless within a config-whitelisted macro. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75569/new/ ht

[PATCH] D75708: Add warnings for casting ptr -> smaller int for C++ in Microsoft mode

2020-03-05 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 248610. aeubanks added a comment. - Add tests for void * Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75708/new/ https://reviews.llvm.org/D75708 Files: clang/lib/Sema/SemaCast.cpp clang/test/SemaCXX/Micr

[PATCH] D75708: Add warnings for casting ptr -> smaller int for C++ in Microsoft mode

2020-03-05 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks marked an inline comment as done. aeubanks added a comment. > I can push this for you and even give attribution (hooray, git!), but I think > you have enough uploaded code reviews that you could request push access as > described here: > https://llvm.org/docs/DeveloperPolicy.html#new-c

[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

2020-03-05 Thread Michael Wyman via Phabricator via cfe-commits
mwyman marked 2 inline comments as done. mwyman added a comment. I goofed on updating with Arcanist—the changes I marked done will be incoming shortly! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75569/new/ https://reviews.llvm.org/D75569 ___

[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

2020-03-05 Thread Michael Wyman via Phabricator via cfe-commits
mwyman marked 6 inline comments as done. mwyman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/objc-method-unavailable-not-override.m:34 +// Verify check when using a macro that expands to the unavailable attribute. +- (void)methodC NS_UNAVAILABLE;

[PATCH] D74935: [LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects

2020-03-05 Thread Jeroen Dobbelaere via Phabricator via cfe-commits
jeroen.dobbelaere added a comment. In D74935#1907939 , @jdoerfert wrote: > In D74935#1907100 , > @jeroen.dobbelaere wrote: > > > Just to give an example: > > > > int foo(int* restrict *pA, int* restrict *pB) { >

[PATCH] D75563: [clang][Parse] properly parse asm-qualifiers, asm inline

2020-03-05 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked 2 inline comments as done and an inline comment as not done. nickdesaulniers added inline comments. Comment at: clang/lib/Parse/ParseStmtAsm.cpp:725 /// [GNU] gnu-asm-statement: -/// 'asm' type-qualifier[opt] '(' asm-argument ')' ';' +///

[PATCH] D75571: [Sema][SVE] Add tests for valid and invalid type usage

2020-03-05 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked 2 inline comments as done. rsandifo-arm added inline comments. Comment at: clang/test/SemaCXX/sizeless-1.cpp:8 +// RUN: %clang_cc1 -fcxx-exceptions -fsyntax-only -verify -W -Wall -Wrange-loop-analysis -triple arm64-linux-gnu -target-feature +sve -std=c++17 %s

[PATCH] D75563: [clang][Parse] properly parse asm-qualifiers, asm inline

2020-03-05 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 248603. nickdesaulniers marked 9 inline comments as done. nickdesaulniers added a comment. - address review comments, add tests for global asm statements. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75

[PATCH] D75571: [Sema][SVE] Add tests for valid and invalid type usage

2020-03-05 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 248601. rsandifo-arm added a comment. Changes in v3: - Prune the number of RUN: lines. - Minor tweaks to the tests themselves. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75571/new/ https://reviews.llv

[PATCH] D75708: Add warnings for casting ptr -> smaller int for C++ in Microsoft mode

2020-03-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Looks good, but we should add a test. I can push this for you and even give attribution (hooray, git!), but I think you have enough uploaded code reviews that you could request push access as described here: https://llvm.org/docs/DeveloperPolicy.html#new-contributors Link t

[PATCH] D75563: [clang][Parse] properly parse asm-qualifiers, asm inline

2020-03-05 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Parse/ParseStmtAsm.cpp:704 + AQ = DeclSpec::AQ_goto; +else { + if (EndLoc.isValid()) aaron.ballman wrote: > I would expect a diagnostic if the unknown token is anything other than a > lef

[PATCH] D75613: [Sema] Reword -Wrange-loop-analysis warning messages

2020-03-05 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75613/new/ https://reviews.llvm.org/D75613

[PATCH] D75489: [clang-tidy] Generalize HeaderFileExtensions.{h, cpp}. NFC

2020-03-05 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75489/new/ https://reviews.llvm.org/D75489

[PATCH] D72860: [modules] Do not cache invalid state for modules that we attempted to load.

2020-03-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Serialization/ModuleManager.cpp:183 // Get a buffer of the file and close the file descriptor when done. - Buf = FileMgr.getBufferForFile(NewModule->File, /*isVolatile=*/false); + Buf = FileMgr.getBufferForFil

[PATCH] D75708: Add warnings for casting ptr -> smaller int for C++ in Microsoft mode

2020-03-05 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added a reviewer: rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adds warnings to groups recently added in https://reviews.llvm.org/D72231. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75708 Files: clang

[PATCH] D75286: [clangd] Handle clang-tidy suppression comments for diagnostics inside macro expansions

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 248598. nridge marked 4 inline comments as done. nridge added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75286/new/ https://reviews.llvm.org/D75286 Files: clang-tools-ext

[PATCH] D75286: [clangd] Handle clang-tidy suppression comments for diagnostics inside macro expansions

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:215 /// to this function. -/// The `CheckMacroExpansion` parameter determines whether the function should -/// handle the case where the

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM with a minor nit. Comment at: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.cpp:40 SmallVector Suffixes; - AllFileExtensions.split(Suffixes, Delimiter); + for (const char Delimiter : Delimit

[PATCH] D75469: Add C standard upgrade in clang-11 release note

2020-03-05 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers abandoned this revision. nickdesaulniers added a comment. Abandoning; I've already pushed this to the right branch. I suspect phabricator doesn't watch the release brances. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75469/new/ h

[PATCH] D75332: [clang-tidy] Add module for llvm-libc and restrict-system-libc-header-check.

2020-03-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D75332#1904317 , @MaskRay wrote: > In D75332#1904264 , @PaulkaToast > wrote: > > > In D75332#1903570 , @MaskRay wrote: > > > > > > `Restric

[PATCH] D31343: Add an attribute plugin example

2020-03-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D31343#1902903 , @john.brawn wrote: > I've been looking into attribute merging, and as far as I can tell there's > two things going on: > > - In SemaDeclAttr.cpp, the various handleXyzAttr functions may call > mergeXyzAt

Re: [clang] bdad0a1 - PR45083: Mark statement expressions as being dependent if they appear in

2020-03-05 Thread Benjamin Kramer via cfe-commits
The test case is not important at all, but the crasher seems to be rather bad. I'll send you the full test case. On Thu, Mar 5, 2020 at 9:20 PM Richard Smith via cfe-commits wrote: > > On Thu, 5 Mar 2020 at 06:13, Benjamin Kramer via cfe-commits > wrote: >> >> creduce produced this. It's a cras

[PATCH] D64464: [CodeGen] Emit destructor calls to destruct compound literals

2020-03-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 248586. ahatanak marked an inline comment as done. ahatanak added a comment. Return `make_error` instead of a nullptr. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64464/new/ https://reviews.llvm.org/D64464

[PATCH] D73245: Depend stddef.h to provide max_align_t for C++11 and provide better fallback in

2020-03-05 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D73245#1896786 , @ldionne wrote: > In D73245#1894420 , @EricWF wrote: > > > @ldionne Since this has the possibility of breaking existing users of > > `std::max_align_t`, can you test thi

[PATCH] D69573: [clang-format] [PR36294] AlwaysBreakAfterReturnType works incorrectly for some operator functions

2020-03-05 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. @hans done here: https://github.com/llvm/llvm-project/commit/50eedc134a219ef6d2345e4efc5471a2e3824223 :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69573/new/ https://reviews.llvm.org/D69573

[PATCH] D75655: [Docs] Document -lto-whole-program-visibility

2020-03-05 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 248582. tejohnson marked an inline comment as done. tejohnson added a comment. Fix gold plugin option Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75655/new/ https://reviews.llvm.org/D75655 Files: clang/d

[PATCH] D75655: [Docs] Document -lto-whole-program-visibility

2020-03-05 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 3 inline comments as done. tejohnson added a subscriber: evgeny777. tejohnson added inline comments. Comment at: clang/docs/LTOVisibility.rst:40 +to hidden LTO visibility when the ``-lto-whole-program-visibility`` lld linker +option is applied (``-plugin-opt=whol

[PATCH] D74166: [AIX][Frontend] Static init implementation for AIX considering no priority

2020-03-05 Thread Xiangling Liao via Phabricator via cfe-commits
Xiangling_L updated this revision to Diff 248571. Xiangling_L marked 2 inline comments as done. Xiangling_L added a comment. Fix the formatting issue; Address the 1st round reviews; CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74166/new/ https://reviews.llvm.org/D74166 Files: clang/

[PATCH] D75698: [analyzer][WIP] Suppress bug reports where a tracked expression's latest value change was a result of an invalidation

2020-03-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus abandoned this revision. Szelethus added a comment. This sounds exciting! Back to work then. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75698/new/ https://reviews.llvm.org/D75698 ___ cfe-c

[PATCH] D75292: [clangd] Remove vsc-extension-quickstart.md from the vscode-clangd plugin

2020-03-05 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa7c655f1480f: [clangd] Remove vsc-extension-quickstart.md from the vscode-clangd plugin (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D72841: [RFC] Add support for pragma float_control, to control precision and exception behavior at the source level

2020-03-05 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. I got an email like this "Harbormaster failed remote builds in B48237 : Diff 248536!" but there is no further information. It builds OK from my workstation. I did have to paste the review because an upload to Phabricator exceeded the s

[PATCH] D75271: [analyzer][NFC] Change LangOptions to CheckerManager in the shouldRegister* functions.

2020-03-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Thanks for bringing it up, I'll attend to it -- though both of those changes are out of scope of this change, and I'd be strongly against solving any of those issues within this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75271/new/ https://revie

[PATCH] D31342: Add ParsedAttrInfo::handleDeclAttribute

2020-03-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6701-6707 if (!AL.isStmtAttr()) { // Type attributes are handled elsewhere; silently move on. assert(AL.isTypeAttr() && "Non-type attribute not handled"); break; }

[PATCH] D75698: [analyzer][WIP] Suppress bug reports where a tracked expression's latest value change was a result of an invalidation

2020-03-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D75698#1908370 , @Szelethus wrote: > In D75698#1908335 , @NoQ wrote: > > > In my head this patch should ideally be reduced to a single if-statement: > > "This value is a `SymbolDerived` //th

[PATCH] D75698: [analyzer][WIP] Suppress bug reports where a tracked expression's latest value change was a result of an invalidation

2020-03-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Like, the only reason why we have `trackExpressionValue` is because our concrete values are indistinguishable from each other. Regardless of where it comes from, `0 (Loc)` is the same as all other `0 (Loc)`s, so we have to manually observe how it was copied around in order

[PATCH] D75698: [analyzer][WIP] Suppress bug reports where a tracked expression's latest value change was a result of an invalidation

2020-03-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added a comment. In D75698#1908335 , @NoQ wrote: > In my head this patch should ideally be reduced to a single if-statement: > "This value is a `SymbolDerived` //therefore// it was produced by > inval

[clang-tools-extra] a7c655f - [clangd] Remove vsc-extension-quickstart.md from the vscode-clangd plugin

2020-03-05 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2020-03-05T15:28:40-05:00 New Revision: a7c655f1480fbcee853fb7d9f6fd4cff80a0dc2f URL: https://github.com/llvm/llvm-project/commit/a7c655f1480fbcee853fb7d9f6fd4cff80a0dc2f DIFF: https://github.com/llvm/llvm-project/commit/a7c655f1480fbcee853fb7d9f6fd4cff80a0dc2f.diff

Re: [clang] bdad0a1 - PR45083: Mark statement expressions as being dependent if they appear in

2020-03-05 Thread Richard Smith via cfe-commits
On Thu, 5 Mar 2020 at 06:13, Benjamin Kramer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > creduce produced this. It's a crash on invalid, but was created from a > valid input. > Well, "valid" is unclear when using language extensions, but OK. > $ cat r.ii > template auto b(a) { > a

[PATCH] D75697: [analyzer] Allow null false positive suppression for conditions

2020-03-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I'm too sure what the implications of such a change is, so I'll get some real-life results before even thinking of commiting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75697/new/ https://reviews.llvm.org/D75697 __

[PATCH] D73979: [HIP] Allow non-incomplete array type for extern shared var

2020-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D73979#1907965 , @JonChesterfield wrote: > In D73979#1857736 , @yaxunl wrote: > > > BTW this is requested by HIP users, who have similar code for CUDA and HIP. > > They found it surprise

[PATCH] D75556: [AST Matchers] Restrict `optionally` matcher to a single argument.

2020-03-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc359f9537ffb: [AST Matchers] Restrict `optionally` matcher to a single argument. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75556/n

[PATCH] D75698: [analyzer][WIP] Suppress bug reports where a tracked expression's latest value change was a result of an invalidation

2020-03-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In my head this patch should ideally be reduced to a single if-statement: "This value is a `SymbolDerived` //therefore// it was produced by invalidation". It's harder than that, of course, because some derived symbols are legitimate (i.e., values returned through out-parame

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-03-05 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/test/OpenMP/parallel_master_codegen.cpp:143 +// CK31: [[A_VAL:%.+]] = alloca i32 +// CK31: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*,

[clang] c359f95 - [AST Matchers] Restrict `optionally` matcher to a single argument.

2020-03-05 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2020-03-05T14:48:40-05:00 New Revision: c359f9537ffb17c4f40a933980ddb515d7ee923b URL: https://github.com/llvm/llvm-project/commit/c359f9537ffb17c4f40a933980ddb515d7ee923b DIFF: https://github.com/llvm/llvm-project/commit/c359f9537ffb17c4f40a933980ddb515d7ee923b.

[clang] 8d7b118 - [OPENMP50]Add codegen for update clause in depobj directive.

2020-03-05 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-03-05T14:31:07-05:00 New Revision: 8d7b1188751b9fcc3345e80fb48a2bc00b7c315f URL: https://github.com/llvm/llvm-project/commit/8d7b1188751b9fcc3345e80fb48a2bc00b7c315f DIFF: https://github.com/llvm/llvm-project/commit/8d7b1188751b9fcc3345e80fb48a2bc00b7c315f.diff

[PATCH] D75494: [PowerPC] Delete PPCMachObjectWriter and triple for darwin

2020-03-05 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3e851f4a688c: [PowerPC] Delete PPCMachObjectWriter and powerpc{,64}-apple-darwin (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75494/n

[PATCH] D75697: [analyzer] Allow null false positive suppression for conditions

2020-03-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Aha! We need some positive results tho, given that these are heuristics. Comment at: clang/test/Analysis/inlining/inline-defensive-checks.m:113 if (!mem) -return 5/zero; // expected-warning {{Division by zero}} +return 5/zero; return 0; --

[PATCH] D71966: [Wdocumentation][RFC] Improve identifier's of \param

2020-03-05 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Thanks for working on this, I'd like to see this being fixed. Comment at: clang/include/clang-c/Documentation.h:383 CINDEX_LINKAGE -CXString clang_ParamCommandComment_getParamName(CXComment Comment); gribozavr2 wrote: > Mordante

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-03-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/test/CodeGenCXX/lto-visibility-inference.cpp:73 c1->f(); - // ITANIUM-NOT: type.test{{.*}}!"_ZTS2C2" + // ITANIUM: type.test{{.*}}!"_ZTS2C2" // MS: type.test{{.*}}!"?AUC2@@" tejohnson wrote: > pcc wrote: > > te

[PATCH] D75271: [analyzer][NFC] Change LangOptions to CheckerManager in the shouldRegister* functions.

2020-03-05 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. It is even worse: the `shouldRegister()` functions do not prevent the registration of a checker, at least in cases when they are not enabled directly but via dependencies. See D75171 . CHANGES SINCE LAST ACTION https://revi

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-05 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done and an inline comment as not done. akhuang added inline comments. Comment at: llvm/include/llvm/IR/DebugInfoFlags.def:61 HANDLE_DI_FLAG((1 << 29), AllCallsDescribed) +HANDLE_DI_FLAG((1 << 30), CxxReturnUdt) akhuang wrot

[clang] ea5b3ef - [OPENMP50]Skip the first element when storing the list of dependencies

2020-03-05 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-03-05T14:26:07-05:00 New Revision: ea5b3ef5935c1a64b78e06fb4b4dcc919fd585b5 URL: https://github.com/llvm/llvm-project/commit/ea5b3ef5935c1a64b78e06fb4b4dcc919fd585b5 DIFF: https://github.com/llvm/llvm-project/commit/ea5b3ef5935c1a64b78e06fb4b4dcc919fd585b5.diff

[clang] 3e851f4 - [PowerPC] Delete PPCMachObjectWriter and powerpc{,64}-apple-darwin

2020-03-05 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2020-03-05T11:05:26-08:00 New Revision: 3e851f4a688c42315355aae743b403dddeba9860 URL: https://github.com/llvm/llvm-project/commit/3e851f4a688c42315355aae743b403dddeba9860 DIFF: https://github.com/llvm/llvm-project/commit/3e851f4a688c42315355aae743b403dddeba9860.diff

[PATCH] D75632: Comment parsing: Treat \ref as inline command

2020-03-05 Thread Aaron Puchert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf23df1b2a323: Comment parsing: Treat \ref as inline command (authored by aaronpuchert). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75632/new/ https://rev

[PATCH] D75655: [Docs] Document -lto-whole-program-visibility

2020-03-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/docs/LTOVisibility.rst:40 +to hidden LTO visibility when the ``-lto-whole-program-visibility`` lld linker +option is applied (``-plugin-opt=whole_program_visibility`` for gold). This +can be used when it is known that the LTO link has

[PATCH] D75701: Initialize IsSurrogate

2020-03-05 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
respindola created this revision. respindola added a reviewer: rsmith. This fixes https://bugs.llvm.org/show_bug.cgi?id=45096 https://reviews.llvm.org/D75701 Files: clang/include/clang/Sema/Overload.h Index: clang/include/clang/Sema/Overload.h ===

[PATCH] D68578: [HIP] Fix device stub name

2020-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 248544. yaxunl marked 11 inline comments as done. yaxunl added a comment. Revised by John's and Artem's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68578/new/ https://reviews.llvm.org/D68578 Files: clang/include/clang/AST/GlobalDecl.h

[PATCH] D75665: [analyzer] On-demand parsing capability for CTU

2020-03-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CallEvent.cpp:578 + + // Optional OnDemandParsingDatabase; + // if (Opts.CTUOnDemandParsing) left here some debugging Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D68578: [HIP] Fix device stub name

2020-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 38 inline comments as done. yaxunl added inline comments. Comment at: clang/include/clang/AST/GlobalDecl.h:40 + Stub = 1, +}; + tra wrote: > rjmccall wrote: > > tra wrote: > > > rjmccall wrote: > > > > tra wrote: > > > > > rjmccall wrote: > > > > >

  1   2   3   >