[PATCH] D91025: [clangd] Fix locateMacroAt() for macro definition outside preamble

2020-11-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman. Herald added a project: clang. nridge requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Fixes https://github.com/clangd/clangd/issues/577 Repository: rG LLVM

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-07 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. Sorry about that, https://reviews.llvm.org/D91019 should fix it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89158/new/ https://reviews.llvm.org/D89158 ___ cfe-commits

[PATCH] D90982: Ignore implicit nodes in IgnoreUnlessSpelledInSource mode

2020-11-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 303682. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90982/new/ https://reviews.llvm.org/D90982 Files: clang/include/clang/AST/ASTNodeTraverser.h

[PATCH] D72218: [clang-tidy] new altera kernel name restriction check

2020-11-07 Thread Frank Derry Wanye via Phabricator via cfe-commits
ffrankies updated this revision to Diff 303680. ffrankies added a comment. Moved test files `KERNEL.cl`, `VHDL.cl` and `vERILOG.cl` to the `uppercase` subdirectory to prevent filename clashes in some environments. This is in response to the buildbot failure where `Verilog.cl`, `KERNEL.cl`, and

[PATCH] D90982: Ignore implicit nodes in IgnoreUnlessSpelledInSource mode

2020-11-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 303679. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90982/new/ https://reviews.llvm.org/D90982 Files: clang/include/clang/AST/ASTNodeTraverser.h

[clang] 4eb8804 - Fix dumping of explicit template specializations

2020-11-07 Thread Stephen Kelly via cfe-commits
Author: Stephen Kelly Date: 2020-11-07T22:34:16Z New Revision: 4eb880439a7ec4a0310b630ff89125e00cf200a3 URL: https://github.com/llvm/llvm-project/commit/4eb880439a7ec4a0310b630ff89125e00cf200a3 DIFF: https://github.com/llvm/llvm-project/commit/4eb880439a7ec4a0310b630ff89125e00cf200a3.diff

[PATCH] D90392: [clang-tidy] Omit std::make_unique/make_shared for default initialization.

2020-11-07 Thread Chris Kennelly via Phabricator via cfe-commits
ckennelly added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-make-shared.cpp:51 // CHECK-FIXES: std::shared_ptr P1 = std::make_shared(); + std::shared_ptr P2 = std::shared_ptr(new int); steveire wrote: > I'm a bit

[PATCH] D90392: [clang-tidy] Omit std::make_unique/make_shared for default initialization.

2020-11-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-make-shared.cpp:51 // CHECK-FIXES: std::shared_ptr P1 = std::make_shared(); + std::shared_ptr P2 = std::shared_ptr(new int); I'm a bit confused. Why don't we

[PATCH] D91015: Extend bugprone-string-constructor-check to std::string_view.

2020-11-07 Thread Chris Kennelly via Phabricator via cfe-commits
ckennelly created this revision. ckennelly added reviewers: EricWF, ymandel. Herald added a project: clang. Herald added a subscriber: cfe-commits. ckennelly requested review of this revision. This allows for matching the constructors std::string has in common with std::string_view. Repository:

[PATCH] D91011: [NFC, Refactor] Rename the (scoped) enum DeclaratorContext enumerator's to avoid redundancy

2020-11-07 Thread Faisal Vali via Phabricator via cfe-commits
faisalv created this revision. faisalv added reviewers: aaron.ballman, bruno. Herald added a project: clang. Herald added a subscriber: cfe-commits. faisalv requested review of this revision. Since these are scoped enumerators, they have to be prefixed by DeclaratorContext, so lets remove

[PATCH] D91009: Include std::basic_string_view in readability-redundant-string-init.

2020-11-07 Thread Chris Kennelly via Phabricator via cfe-commits
ckennelly created this revision. ckennelly added reviewers: EricWF, ymandel. Herald added a project: clang. Herald added a subscriber: cfe-commits. ckennelly requested review of this revision. std::string_view("") produces a string_view instance that compares equal to std::string_view(), but

[PATCH] D90992: [clang-tidy] Use vfs::FileSystem when getting config

2020-11-07 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd725f1ce5318: [clang-tidy] Use vfs::FileSystem when getting config (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D90992?vs=303630=303658#toc Repository: rG LLVM Github

[clang-tools-extra] d725f1c - [clang-tidy] Use vfs::FileSystem when getting config

2020-11-07 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2020-11-07T19:18:02Z New Revision: d725f1ce5318f8aca12632d3b7cfb3a5968e5d37 URL: https://github.com/llvm/llvm-project/commit/d725f1ce5318f8aca12632d3b7cfb3a5968e5d37 DIFF: https://github.com/llvm/llvm-project/commit/d725f1ce5318f8aca12632d3b7cfb3a5968e5d37.diff LOG:

[PATCH] D90944: [clang-tidy] implement misc-mt-unsafe

2020-11-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. While i share concern about false-positives, it is literally impossible to avoid them here, and this should be viewed more as an enforcement tool (don't use thread-unsafe fns), not bug-detection check. What i would however like to be improved, is better docs. I'm

[PATCH] D17993: [CodeGen] Apply 'nonnull' to 'this' pointer arguments.

2020-11-07 Thread CJ Johnson via Phabricator via cfe-commits
CJ-Johnson added inline comments. Comment at: clang/test/CodeGenCXX/this-nonnull.cpp:1-2 +// RUN: %clang_cc1 -S -emit-llvm -o - -triple %itanium_abi_triple %s | FileCheck %s -check-prefix=CHECK-YES +// RUN: %clang_cc1 -S -emit-llvm -o - -fno-delete-null-pointer-checks -triple

[PATCH] D17993: [CodeGen] Apply 'nonnull' to 'this' pointer arguments.

2020-11-07 Thread CJ Johnson via Phabricator via cfe-commits
CJ-Johnson updated this revision to Diff 303648. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D17993/new/ https://reviews.llvm.org/D17993 Files: clang/docs/ReleaseNotes.rst clang/lib/CodeGen/CGCall.cpp clang/test/CXX/except/except.spec/p14-ir.cpp

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-11-07 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze marked an inline comment as done. gbencze added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.cpp:45 + + for (unsigned int i = 0; i < 2; ++i) { +const Expr *ArgExpr = CE->getArg(i); aaron.ballman

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-11-07 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze updated this revision to Diff 303643. gbencze added a comment. - Added some new test cases - Fixed assertion in templates - Changed loop variable name from `i` to `ArgIndex` - Changed wording of warnings - Changed CHECK-MESSAGES to be in a single line: turns out that only the first line

[PATCH] D90972: [clang-tidy] Install run-clang-tidy.py in bin/ as run-clang-tidy

2020-11-07 Thread Florian Schmaus via Phabricator via cfe-commits
Flow updated this revision to Diff 303642. Flow added a comment. Use backticks in ReleaseNotes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90972/new/ https://reviews.llvm.org/D90972 Files: clang-tools-extra/clang-tidy/tool/CMakeLists.txt

[PATCH] D90714: [clang]Fix length threshold for MicrosoftMangle md5 hash

2020-11-07 Thread Melanie Blower via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc511963d5adb: [clang] Fix length threshold for MicrosoftMangle md5 hash (authored by mibintc). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] c511963 - [clang] Fix length threshold for MicrosoftMangle md5 hash

2020-11-07 Thread Melanie Blower via cfe-commits
Author: Melanie Blower Date: 2020-11-07T07:40:24-08:00 New Revision: c511963d5adb1a8ca16adabf4b49f8d013a66785 URL: https://github.com/llvm/llvm-project/commit/c511963d5adb1a8ca16adabf4b49f8d013a66785 DIFF:

[PATCH] D90714: [clang]Fix length threshold for MicrosoftMangle md5 hash

2020-11-07 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 303640. mibintc added a comment. I submitted the test improvements separately, i'm going to push this version, thanks all Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90714/new/

[clang] b0de3f6 - [clang] Improve Microsoft mangling lit test with dblaikie's suggestions

2020-11-07 Thread Melanie Blower via cfe-commits
Author: Melanie Blower Date: 2020-11-07T07:32:34-08:00 New Revision: b0de3f67874ac3eff465cb2ef8ab6081292625c3 URL: https://github.com/llvm/llvm-project/commit/b0de3f67874ac3eff465cb2ef8ab6081292625c3 DIFF:

[PATCH] D91000: [clang-tidy] CERT MSC24-C Obsolescent Functions check

2020-11-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/ObsolescentFunctionsCheck.cpp:19 +namespace { +static Preprocessor *PP; +} Why this could not be member of check class? Comment at:

[PATCH] D90972: [clang-tidy] Install run-clang-tidy.py in bin/ as run-clang-tidy

2020-11-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:76 +- The run-clang-tidy.py helper script is now installed in bin/ as + run-clang-tidy. It was previously installed in share/clang/. Please enclose run-clang-tidy.py,

[PATCH] D90972: [clang-tidy] Install run-clang-tidy.py in bin/ as run-clang-tidy

2020-11-07 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru accepted this revision. sylvestre.ledru added a comment. This revision is now accepted and ready to land. Sounds great. You might want to ask feedback to other reviews too! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90972/new/

[PATCH] D90975: [clangd] Don't run clang-tidy AST traversal if there are no checks.

2020-11-07 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 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/D90975/new/ https://reviews.llvm.org/D90975

[PATCH] D91001: [clang-tidy] Install run-clang-tidy.py as run-clang-tidy

2020-11-07 Thread Florian Schmaus via Phabricator via cfe-commits
Flow abandoned this revision. Flow added a comment. All changes introduced by this are now done in https://reviews.llvm.org/D90972 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91001/new/ https://reviews.llvm.org/D91001

[PATCH] D90972: [clang-tidy] Install run-clang-tidy.py in bin/ as run-clang-tidy

2020-11-07 Thread Florian Schmaus via Phabricator via cfe-commits
Flow updated this revision to Diff 303638. Flow retitled this revision from "[clang-tidy] Install run-clang-tidy.py in bin/ not in share/clang/" to "[clang-tidy] Install run-clang-tidy.py in bin/ as run-clang-tidy". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D90992: [clang-tidy] Use vfs::FileSystem when getting config

2020-11-07 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 aside from a nit with the test. Comment at: clang-tools-extra/unittests/clang-tidy/OptionsProviderTest.cpp:68 +} // namespace clang \ No newline at end of

[PATCH] D90180: [clang-tidy] find/fix unneeded semicolon after switch

2020-11-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D90180#2379803 , @nickdesaulniers wrote: > In D90180#2375878 , @aaron.ballman > wrote: > >> In D90180#2374839 , >> @nickdesaulniers

[PATCH] D90972: [clang-tidy] Install run-clang-tidy.py in bin/ not in share/clang/

2020-11-07 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru requested changes to this revision. sylvestre.ledru added a comment. This revision now requires changes to proceed. Thanks. Could you please also update the release notes for 12? And if you are motivated, this script should be documented (or at least mentioned in the doc a bit

[PATCH] D90972: [clang-tidy] Install run-clang-tidy.py in bin/ not in share/clang/

2020-11-07 Thread Florian Schmaus via Phabricator via cfe-commits
Flow added a comment. In D90972#2380640 , @sylvestre.ledru wrote: > By the way, while you are working on it, why not removing the python > extension when installing? We don't need to know that it is Python code. Thanks for the feedback. Please see

[PATCH] D91001: [clang-tidy] Install run-clang-tidy.py as run-clang-tidy

2020-11-07 Thread Florian Schmaus via Phabricator via cfe-commits
Flow created this revision. Flow added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. Flow requested review of this revision. Installed scripts in PATH usually do not carry a filename extension, since there is no need to know

[PATCH] D91000: MSC24-C Obsolescent Functions check

2020-11-07 Thread Koller Tamás via Phabricator via cfe-commits
ktomi996 updated this revision to Diff 303633. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91000/new/ https://reviews.llvm.org/D91000 Files: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp clang-tools-extra/clang-tidy/cert/CMakeLists.txt

[PATCH] D91000: MSC24-C Obsolescent Functions check

2020-11-07 Thread Koller Tamás via Phabricator via cfe-commits
ktomi996 created this revision. ktomi996 added reviewers: aaron.ballman, alexfh, hokein, njames93. ktomi996 added a project: clang-tools-extra. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. ktomi996 requested review of this revision. This checker guards against

[PATCH] D90992: [clang-tidy] Use vfs::FileSystem when getting config

2020-11-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 303630. njames93 added a comment. Small tweak to the tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90992/new/ https://reviews.llvm.org/D90992 Files: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp

[PATCH] D90992: [clang-tidy] Use vfs::FileSystem when getting config

2020-11-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 303629. njames93 added a comment. Herald added a subscriber: mgorny. Added unittest for loading configs from an InMemoryFileSystem. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90992/new/

[PATCH] D90599: Fix a leak in `ASTUnit::LoadFromCommandLine()` wehn compiler invocation fails

2020-11-07 Thread Boris Staletic via Phabricator via cfe-commits
bstaletic updated this revision to Diff 303624. bstaletic added a comment. Fixed the code formatting error. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90599/new/ https://reviews.llvm.org/D90599 Files: clang/lib/Frontend/ASTUnit.cpp Index: clang/lib/Frontend/ASTUnit.cpp

[PATCH] D90972: [clang-tidy] Install run-clang-tidy.py in bin/ not in share/clang/

2020-11-07 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. FWIW, I am doing this change already in Debian & Ubuntu ( https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/10/debian/clang-tidy-X.Y.links.in#L2 ) By the way, while you are working on it, why not removing the python extension when installing? We

[PATCH] D90972: [clang-tidy] Install run-clang-tidy.py in bin/ not in share/clang/

2020-11-07 Thread Florian Schmaus via Phabricator via cfe-commits
Flow added reviewers: alexfh, sylvestre.ledru, Eugene.Zelenko. Flow added a comment. Adding involved persons from https://reviews.llvm.org/D12700 as reviewers, which was the change introducing `share/clang/` as install location. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-07 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. $ cmake \ -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER=$(command -v clang) \ -DCMAKE_CXX_COMPILER=$(command -v clang++) \ -DLLVM_CCACHE_BUILD=ON \ -DLLVM_ENABLE_PROJECTS="clang;polly" \ -DLLVM_TARGETS_TO_BUILD=X86 \