[PATCH] D71953: [Tooling] Infer driver mode and target for FixedCompilationDatabase

2019-12-28 Thread Hanjiang Yu via Phabricator via cfe-commits
de1acr0ix updated this revision to Diff 235496. de1acr0ix added a comment. Check if argv[0] is an option before inferring - anything starting with dash or slash (but without a second slash) will be treated as compiler option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71969: [OpenMP] diagnose zero-length array section in the depend clause

2019-12-28 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 created this revision. kkwli0 added a reviewer: ABataev. Herald added a subscriber: guansong. Herald added a reviewer: jdoerfert. The OpenMP specification disallows having zero-length array sections in the depend clause (OpenMP 5.0 2.17.11). https://reviews.llvm.org/D71969 Files:

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Sorry I didn't make it obvious with the test cases. The fix will never extend the lifetime of variables either in the condition or declared in the else block. It will only apply if the if is the last statement in its scope. Though I should check back through the scope

[PATCH] D71439: Allow redeclaration of __declspec(uuid)

2019-12-28 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0acfc493171a: Allow redeclaration of __declspec(uuid) (authored by zahen, committed by rnk). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71439/new/

[PATCH] D71439: Allow redeclaration of __declspec(uuid)

2019-12-28 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D71439#1789141 , @zahen wrote: > @rnk Can you please submit on my behalf. I don't have commit access. Sorry for the delay, I pushed it today. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 0acfc49 - Allow redeclaration of __declspec(uuid)

2019-12-28 Thread Reid Kleckner via cfe-commits
Author: Zachary Henkel Date: 2019-12-28T13:13:46-08:00 New Revision: 0acfc493171a880215327ecd70e3e01e1cd493df URL: https://github.com/llvm/llvm-project/commit/0acfc493171a880215327ecd70e3e01e1cd493df DIFF:

[PATCH] D71436: [X86][AsmParser] re-introduce 'offset' operator

2019-12-28 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. lgtm, thanks! Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:1821 +getParser().parsePrimaryExpr(Val, End)) + return Error(Start, "unexpected token!"); +

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp:29 + unless(anyOf( + isConstexpr(), hasDeclContext(namespaceDecl(isAnonymous())), + hasType(isConstQualified()),

[PATCH] D71963: clang-tidy doc: Add the severities description

2019-12-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think this is a reasonable first-pass at the severity descriptions, but do you think we should add some words that tell the user to use whatever severity is picked by a coding standard if one is being followed? For instance, the CERT rules all come with a

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

2019-12-28 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. The merge bot noticed I forgot to update clang's unittests. Will look at that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71966/new/ https://reviews.llvm.org/D71966 ___

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

2019-12-28 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon question-circle color=gray} Unit tests: unknown. {icon times-circle color=red} clang-tidy: fail. Please fix clang-tidy findings . {icon times-circle color=red}

[PATCH] D71965: include missing for std::abort

2019-12-28 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61133 tests passed, 0 failed and 728 were skipped. {icon check-circle color=green} clang-tidy: pass. {icon check-circle color=green} clang-format: pass. Build artifacts

[PATCH] D71965: include missing for std::abort

2019-12-28 Thread Khem Raj via Phabricator via cfe-commits
raj.khem created this revision. raj.khem added reviewers: kadircet, jfb. raj.khem added a project: clang-tools-extra. Herald added subscribers: cfe-commits, usaxena95, arphaman, dexonsmith, jkorous, ilya-biryukov. Herald added a project: clang. Fixes

Re: [clang] 3ced239 - Refactor CompareReferenceRelationship and its callers in preparation for

2019-12-28 Thread Kim Gräsman via cfe-commits
Yes, it is this change that broke us. I still don't fully understand what the change was, but it appears to mess things up for IWYU for operator== with templates and const, somehow. Could you expand on what changed here and how the AST might be affected? Thanks, - Kim On Sat, Dec 28, 2019 at

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-28 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal marked 2 inline comments as done. vingeldal added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/list.rst:198 cppcoreguidelines-avoid-magic-numbers (redirects to readability-magic-numbers) +

[PATCH] D71939: clang-format: fix conflict between FormatStyle::BWACS_MultiLine and BeforeCatch/BeforeElse

2019-12-28 Thread Pavlo Shkrabliuk via Phabricator via cfe-commits
pastey added a comment. Thanks for your feedback. Let's see what other reviewers say. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71939/new/ https://reviews.llvm.org/D71939 ___ cfe-commits mailing list

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-28 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal updated this revision to Diff 235483. vingeldal added a comment. Updating D70265 : [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines - Adjusted the line breaks of some string literals. - Modified list.rst Repository: rG LLVM Github

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-28 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/list.rst:198 cppcoreguidelines-avoid-magic-numbers (redirects to readability-magic-numbers) + cppcoreguidelines-avoid-non-const-global-variables

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-28 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/list.rst:411 * + cppcoreguidelines-avoid-non-const-global-variables + It should not be there. It won't be referenced on the list. If you are uncomfortable setting

[PATCH] D71963: clang-tidy doc: Add the severities description

2019-12-28 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. sylvestre.ledru added reviewers: dkrupp, aaron.ballman. Herald added subscribers: rnkovacs, whisperity. Herald added a project: clang. I took the text from codechecker. Daniel Krupp ( @dkrupp ) wrote it. Repository: rG LLVM Github Monorepo

[PATCH] D71962: Fix crash in getFullyQualifiedName for inline namespace

2019-12-28 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61132 tests passed, 0 failed and 728 were skipped. {icon check-circle color=green} clang-tidy: pass. {icon check-circle color=green} clang-format: pass. Build artifacts

[PATCH] D71962: Fix crash in getFullyQualifiedName for inline namespace

2019-12-28 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG128f39da932b: Fix crash in getFullyQualifiedName for inline namespace (authored by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71962/new/

[clang] 128f39d - Fix crash in getFullyQualifiedName for inline namespace

2019-12-28 Thread Alexey Bader via cfe-commits
Author: Alexey Bader Date: 2019-12-28T16:35:51+03:00 New Revision: 128f39da932be50cb49646084820119e6e0d1e22 URL: https://github.com/llvm/llvm-project/commit/128f39da932be50cb49646084820119e6e0d1e22 DIFF: https://github.com/llvm/llvm-project/commit/128f39da932be50cb49646084820119e6e0d1e22.diff

[PATCH] D71962: Fix crash in getFullyQualifiedName for inline namespace

2019-12-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for fixing this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71962/new/ https://reviews.llvm.org/D71962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D71962: Fix crash in getFullyQualifiedName for inline namespace

2019-12-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov 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/D71962/new/ https://reviews.llvm.org/D71962

[PATCH] D71962: Fix crash in getFullyQualifiedName for inline namespace

2019-12-28 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. bader added reviewers: bkramer, ilya-biryukov. Herald added subscribers: cfe-commits, ebevhan. Herald added a project: clang. The ICE happens when the most outer namespace is an inline namespace. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D71962

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-28 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal marked an inline comment as done. vingeldal added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp:29 + unless(anyOf( + isConstexpr(), hasDeclContext(namespaceDecl(isAnonymous())), +

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-28 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal marked an inline comment as done. vingeldal added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp:123-124 + "member variable %0 provides global access to non-const type, " +

Re: [clang] 3ced239 - Refactor CompareReferenceRelationship and its callers in preparation for

2019-12-28 Thread Kim Gräsman via cfe-commits
Hi Richard, I see the commit message mentions type sugar here; does this change affect the AST at all? We're seeing test failures in IWYU based on recent Clang, and I'm suspecting this commit (it takes me a while to bisect because of Clang build times on my laptop). Thanks, - Kim On Wed, Dec

[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

2019-12-28 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I like the goal of this patch and the simplifications it does. I don't feel qualified to do a full review. Comment at: clang/include/clang/AST/Expr.h:126 +if (TD) + D = D | DependencyFlags::Type; +if (VD) Just curious

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D71846#1796883 , @njames93 wrote: > So I wasn't happy with the vagueness of the else after return check > implementation. Almost finished rewriting the check to properly handle the if > statements with condition

[PATCH] D71174: [clang-tidy] new check: bugprone-signed-char-misuse

2019-12-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.cpp:97-98 + diag(CastExpression->getBeginLoc(), + "singed char -> integer (%0) conversion; " + "consider to cast to unsigned char first.") + <<

[PATCH] D70876: [clang-tidy] Add spuriously-wake-up-functions check

2019-12-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SpuriouslyWakeUpFunctionsCheck.cpp:60 + .bind("wait")); + Finder->addMatcher( + ifStmt(anyOf( Sorry for not noticing this earlier, but I think you can make two

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp:29 + unless(anyOf( + isConstexpr(), hasDeclContext(namespaceDecl(isAnonymous())), + hasType(isConstQualified()),

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-28 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp:64 + + if (Variable) { +diag(Variable->getLocation(), "variable %0 is non-const and globally " aaron.ballman wrote: >

[PATCH] D70265: [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines

2019-12-28 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal updated this revision to Diff 235474. vingeldal marked 12 inline comments as done. vingeldal added a comment. Updating D70265 : [clang-tidy] Add clang tidy check I.2 to cppcoreguidelines - Updated list.rst - changed: "pointed to" -> "pointed-to" -

Re: [clang] d801823 - Revert "CWG2352: Allow qualification conversions during reference binding."

2019-12-28 Thread Richard Smith via cfe-commits
On Fri, 27 Dec 2019 at 15:59, David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Fri, Dec 27, 2019 at 3:48 PM Richard Smith > wrote: > >> On Fri, 27 Dec 2019 at 12:27, David Blaikie via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> >>> Author: David Blaikie >>>

[PATCH] D71939: clang-format: fix conflict between FormatStyle::BWACS_MultiLine and BeforeCatch/BeforeElse

2019-12-28 Thread Pablo Martin-Gomez via Phabricator via cfe-commits
Bouska added a comment. I'm not sure creating a special case for else/catch is the best idea. I would seem better to change the control statement @ line 309 to add it the case where we break before else or catch (add a new || test in the middle condition). I'm really new to this code too, so I

[PATCH] D71174: [clang-tidy] new check: bugprone-signed-char-misuse

2019-12-28 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas marked 2 inline comments as done. ztamas added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/list.rst:66 bugprone-posix-return + bugprone-signed-char-misuse bugprone-sizeof-container sylvestre.ledru wrote: > list.rst has

[PATCH] D71174: [clang-tidy] new check: bugprone-signed-char-misuse

2019-12-28 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas updated this revision to Diff 235470. ztamas added a comment. Rebase patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71174/new/ https://reviews.llvm.org/D71174 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[PATCH] D70876: [clang-tidy] Add spuriously-wake-up-functions check

2019-12-28 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 235469. abelkocsis marked an inline comment as done. abelkocsis added a comment. Checker fixes, updates test file adding test cases for `doWhile` and `for` statements, test headers deleted. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D70876: [clang-tidy] Add spuriously-wake-up-functions check

2019-12-28 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis marked 11 inline comments as done. abelkocsis added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-spuriously-wake-up-functions.cpp:2 +// RUN: %check_clang_tidy %s bugprone-spuriously-wake-up-functions %t -- -- -I

[PATCH] D71939: clang-format: fix conflict between FormatStyle::BWACS_MultiLine and BeforeCatch/BeforeElse

2019-12-28 Thread Pavlo Shkrabliuk via Phabricator via cfe-commits
pastey updated this revision to Diff 235466. pastey added a comment. Bouska, thank you! Don't know how I missed that failing test. Never commit on friday :) However, seeing this test result in a browser window gave me that "a-ha". I understood that I had wrong perception of what MultiLine

[PATCH] D71174: [clang-tidy] new check: bugprone-signed-char-misuse

2019-12-28 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/list.rst:66 bugprone-posix-return + bugprone-signed-char-misuse bugprone-sizeof-container list.rst has changed, you should try to rebase your patch!