[PATCH] D125340: [clang][NFC][AST] rename the ImportError to ASTImportError

2022-05-12 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Yeah, okay, this patch makes sense now that I've seen a clash with python's ImportError . I've checked lldb c++ files and `ImportError` is

[PATCH] D125340: [clang][NFC][AST] rename the ImportError to ASTImportError

2022-05-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. LLDB should be at least compilable after the change. If it has an internal `ImportError` we must not change it. If it uses the renamed class we should rename it, or make an "using" alias and no rename (but not this is the best solution). Repository: rG LLVM Github

[PATCH] D125451: [clang-format] Handle comments below r_brace in RemoveBracesLLVM

2022-05-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: curdeius, HazardyKnusperkeks, MyDeveloperDay. Herald added a project: All. owenpan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If a closing brace is followed by a non-trailing comm

[PATCH] D124674: [analyzer] Indicate if a parent state is infeasible

2022-05-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp:46 +ConstraintManager::ProgramStatePair +ConstraintManager::assumeDual(ProgramStateRef State, DefinedSVal Cond) { + ProgramStateRef StTrue = assume(State, Cond, true);

[PATCH] D125360: [analyzer] Add taint to the BoolAssignmentChecker

2022-05-12 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125360/new/ https://reviews.llvm.org/D125360

[PATCH] D122734: [CUDA][HIP] Fix mangling number for local struct

2022-05-12 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. Hi, I noticed when compiling with gcc 9.3.0 that we get a bunch of new warnings with this patch: [1/351] Building CXX object tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/MicrosoftCXXABI.cpp.o ../../clang/lib/AST/MicrosoftCXXABI.cpp:57:12: warning: 'virtual unsig

[PATCH] D125209: [clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks

2022-05-12 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp:87-88 const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { -PP->addPPCallbacks( -::std::make_unique(*this, getLangOpts())); +

[PATCH] D125209: [clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks

2022-05-12 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp:135 {"float.h", "cfloat"}, {"limits.h", "climits"}, {"locale.h", "clocale"}, steakhal wrote: > whisperity wrote

[PATCH] D120727: [libc++] Overhaul how we select the ABI library

2022-05-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: libcxx/CMakeLists.txt:250 + +set(LIBCXX_SUPPORTED_ABI_LIBRARIES none libcxxabi system-libcxxabi libcxxrt libstdc++ libsupc++ vcruntime) +set(LIBCXX_CXX_ABI "${LIBCXX_DEFAULT_ABI_LIBRARY}" CACHE STRING "Specify C++ ABI library to use. Su

[PATCH] D125400: [clang][Analyzer] Add errno state to standard functions modeling.

2022-05-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Nice work! Could you pleas add some lit tests that describe an errno related bugreport for a standard lib function? Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:381 + class ErrnoConstraintKind { + public: ---

[PATCH] D121733: Clean pathnames in FileManager.

2022-05-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/index/CanonicalIncludes.cpp:24 + static auto *Mappings = + new std::array, 645>{{ + {"algorithm", ""}, ppluzhnikov wrote: > ilya-biryukov wrote: > > Don't specify sizes of ar

[PATCH] D123773: [clang][analyzer][ctu] Make CTU a two phase analysis

2022-05-12 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:116 + const bool Foreign = false; // From CTU. + xazax.hun wrote: > martong wrote: > > martong wrote: > > >

[PATCH] D124860: [clang][AArch64][SVE] Implicit conversions for vector-scalar operations

2022-05-12 Thread Peter Waller via Phabricator via cfe-commits
peterwaller-arm added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:10586 + (!LHSBuiltinTy && !LHSBuiltinTy->isVLSTBuiltinType() && + !LHSType->isRealType())) { +Diag(Loc, diag::err_typecheck_vector_not_convertable_non_scalar) `!Ptr && [

[PATCH] D125400: [clang][Analyzer] Add errno state to standard functions modeling.

2022-05-12 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. The bugreports look promising. However, I think we desperately need a note that describes which function has set the `errno_modeling` state. Below I'd expect the following notes for the highlighted function call. - assuming return value of `mkdir` is in range [0, INT_MA

[PATCH] D125209: [clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks

2022-05-12 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked 6 inline comments as done. steakhal added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp:87-88 const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { -PP->addPPCallbacks( -::s

[PATCH] D123773: [clang][analyzer][ctu] Make CTU a two phase analysis

2022-05-12 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang/include/clang/AST/ASTImporterSharedState.h:83 + + void setNewDecl(Decl *ToD) { NewDecls.insert(ToD); } }; (The naming of this function feels a bit odd. `markAsNewDecl` or just `markNewDecl`?) ==

[PATCH] D125209: [clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks

2022-05-12 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. LGTM. Some typos inline. Also I think this is a significant enough bug-fix that it warrants an entry in the Release Notes under `Changes to existing checks`. Also, the tests are failing, but it fails on the formatting of the test file (???), and not the actual test i

[PATCH] D125209: [clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks

2022-05-12 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. (Also: this is a fix to an issue of your own finding and not something that was reported on Bugzilla? Just to make sure we cross-reference and close tickets.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125209/new/ ht

[clang] b6d8c84 - [clang-format] Don't remove braces if a 1-statement body would wrap

2022-05-12 Thread via cfe-commits
Author: owenca Date: 2022-05-12T03:53:08-07:00 New Revision: b6d8c84f28103104a5707091f970d80df423b6c9 URL: https://github.com/llvm/llvm-project/commit/b6d8c84f28103104a5707091f970d80df423b6c9 DIFF: https://github.com/llvm/llvm-project/commit/b6d8c84f28103104a5707091f970d80df423b6c9.diff LOG: [

[PATCH] D125137: [clang-format] Don't remove braces if a 1-statement body would wrap

2022-05-12 Thread Owen Pan 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 rGb6d8c84f2810: [clang-format] Don't remove braces if a 1-statement body would wrap (authored by owenpan). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D125209: [clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks

2022-05-12 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked 3 inline comments as done. steakhal added a comment. In D125209#3508573 , @whisperity wrote: > LGTM. Some typos inline. Also I think this is a significant enough bug-fix > that it warrants an entry in the Release Notes under `Changes to

[PATCH] D125209: [clang-tidy] modernize-deprecated-headers check should respect extern "C" blocks

2022-05-12 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 428904. steakhal marked an inline comment as done. steakhal added a comment. - Fix typos. - Mention this in the release notes. - `clang-format` the test file as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D124946: [clang] serialize ORIGINAL_PCH_DIR relative to BaseDirectory

2022-05-12 Thread Nathan Sidwell via Phabricator via cfe-commits
urnathan accepted this revision. urnathan added a comment. This revision is now accepted and ready to land. good to go, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124946/new/ https://reviews.llvm.org/D124946

[PATCH] D125429: Comment parsing: Allow inline commands to have 0 or more than 1 argument

2022-05-12 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/AST/CommentCommands.td:93 +def N : InlineCommand<"n", 0>; + Could you add a test that shows that the text

[PATCH] D124658: [analyzer] Canonicalize SymIntExpr so the RHS is positive when possible

2022-05-12 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added a comment. Thank you for additional checks. Unfortunatelly, I am not able to perform commits for this and next wee (up to 20th of May), so I wonder if you could commit this one for me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124658/new/ https://

[PATCH] D125429: Comment parsing: Allow inline commands to have 0 or more than 1 argument

2022-05-12 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. Thanks @aaronpuchert ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125429/new/ https://reviews.llvm.org/D125429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D113793: Comment Sema: Run checks only when appropriate (NFC)

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In general, I think this approach is defensible. Though I do wonder if we want to put an assert in the check functions to assert that the command is what you'd expect, so someone calling the check functions incorrectly will get some early feedback. WDYT? ==

[PATCH] D125178: Warn if using `elifdef` & `elifndef` in not C2x & C++2b mode

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Oops, it looks like precommit CI found a relevant issue, can you fix it up? Failed Tests (1): Clang :: Preprocessor/elifdef.c Testing Time: 790.67s Skipped :56 Unsupported : 1997 Passed : 87720 Expectedly Fail

[PATCH] D125178: Warn if using `elifdef` & `elifndef` in not C2x & C++2b mode

2022-05-12 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui updated this revision to Diff 428910. ken-matsui added a comment. Fix the failed test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125178/new/ https://reviews.llvm.org/D125178 Files: clang/docs/ReleaseNotes.rst clang/include/clang/

[PATCH] D125178: Warn if using `elifdef` & `elifndef` in not C2x & C++2b mode

2022-05-12 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. I fixed it! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125178/new/ https://reviews.llvm.org/D125178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D123498: [clang] Adding Platform/Architecture Specific Resource Header Installation Targets

2022-05-12 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 added inline comments. Comment at: clang/lib/Headers/CMakeLists.txt:421 install( FILES ${ppc_wrapper_files} craig.topper wrote: > There appear to be two installs of ppc_wrapper_files with different > components. Is that intentional? Ah yes this

[PATCH] D124726: Suggest typoed directives in preprocessor conditionals

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. You should also come up with a release note for the changes. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:431-432 +def err_pp_invalid_directive : Error< + "invalid preprocessing directive%select{|, did you mean '#%1'?}0" +>; +def w

[PATCH] D125463: [analyzer][NFC] Tighten some of the SValBuilder return types

2022-05-12 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: NoQ, martong, ASDenysPetrov. Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a project: All. steak

[PATCH] D125402: [clang][diag] warn if function returns class type by-const-value

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: aaron.ballman, clang-language-wg. aaron.ballman added a comment. Thank you for working on this new diagnostic! We don't typically add new diagnostics that are off by default unless they're for pedantic diagnostics or are reasonably expected to be enabled by default

[clang] a1545f5 - Warn if using `elifdef` & `elifndef` in not C2x & C++2b mode

2022-05-12 Thread Aaron Ballman via cfe-commits
Author: Ken Matsui Date: 2022-05-12T09:26:44-04:00 New Revision: a1545f51a9ef299ca6c6716bd80b862f360453ab URL: https://github.com/llvm/llvm-project/commit/a1545f51a9ef299ca6c6716bd80b862f360453ab DIFF: https://github.com/llvm/llvm-project/commit/a1545f51a9ef299ca6c6716bd80b862f360453ab.diff LO

[PATCH] D125178: Warn if using `elifdef` & `elifndef` in not C2x & C++2b mode

2022-05-12 Thread Aaron Ballman 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 rGa1545f51a9ef: Warn if using `elifdef` & `elifndef` in not C2x & C++2b mode (authored by ken-matsui, committed by aaron.ballman). Changed prior to co

[PATCH] D125402: [clang][diag] warn if function returns class type by-const-value

2022-05-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:5203 + T.isConstQualified() && + T->isStructureOrClassType()) { +const SourceLocation ConstLoc = D.getDeclSpec().getConstSpecLoc(); I wonder if this is same concer

[PATCH] D124702: [MSVC] Add support for pragma function

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Preprocessor/pragma_microsoft.c:210 +#pragma function(main) // expected-warning {{'main' is not a recognized builtin; consider including }} +#pragma function(// expected-warning

[clang] 1474244 - Reland "[analyzer] Canonicalize SymIntExpr so the RHS is positive when possible"

2022-05-12 Thread Balazs Benics via cfe-commits
Author: Tomasz Kamiński Date: 2022-05-12T15:40:11+02:00 New Revision: 14742443a25826547e480189657b16c7a11664e7 URL: https://github.com/llvm/llvm-project/commit/14742443a25826547e480189657b16c7a11664e7 DIFF: https://github.com/llvm/llvm-project/commit/14742443a25826547e480189657b16c7a11664e7.dif

[PATCH] D124658: [analyzer] Canonicalize SymIntExpr so the RHS is positive when possible

2022-05-12 Thread Balázs Benics 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 rG14742443a258: Reland "[analyzer] Canonicalize SymIntExpr so the RHS is positive when possible" (authored by tomasz-kaminski-sonarsource, committed b

[PATCH] D124702: [MSVC] Add support for pragma function

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaAttr.cpp:1070 +SourceLocation Loc, const llvm::SmallVectorImpl &NoBuiltins) { + if (!CurContext->isFileContext()) { +Diag(Loc, diag::err_pragma_expected_file_scope) << "function"; It loo

[PATCH] D122126: [LoopVectorize] Don't interleave when the number of runtime checks exceeds the threshold

2022-05-12 Thread Tiehu Zhang via Phabricator via cfe-commits
TiehuZhang updated this revision to Diff 428930. TiehuZhang added a comment. (Updated) Difference with accepted version: Move memory runtime checks to processLoop to control both VF and IC Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122126/new/

[PATCH] D122126: [LoopVectorize] Don't interleave when the number of runtime checks exceeds the threshold

2022-05-12 Thread Tiehu Zhang via Phabricator via cfe-commits
TiehuZhang added a comment. The code has been updated since accept. Please review it again. Thank you very much! @fhahn @dmgreen Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:10460 IC = CM.selectInterleaveCount(VF.Width, *VF.Cost.getValue()); +if (!UserI

[PATCH] D125395: [analyzer][solver] Handle UnarySymExpr in RangeConstraintSolver

2022-05-12 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 13 inline comments as done. martong added a comment. In D125395#3506854 , @steakhal wrote: > Great content! > I've got a long list of nits though. Nothing personal :D No worries, thank you for being assiduous. Comment a

[PATCH] D125395: [analyzer][solver] Handle UnarySymExpr in RangeConstraintSolver

2022-05-12 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 428932. martong marked 6 inline comments as done. martong added a comment. - Address steakhal review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125395/new/ https://reviews.llvm.org/D125395 Files:

[PATCH] D124613: In MSVC compatibility mode, friend function declarations behave as function declarations

2022-05-12 Thread Fred Tingaud via Phabricator via cfe-commits
frederic-tingaud-sonarsource added a comment. Regarding the "why": Our tools (SonarQube / SonarCloud / SonarLint) use the clang front-end to parse our customer's code and find bugs/bad patterns in it. Said customer code can target various compilers including MSVC and we need to handle it as grac

[PATCH] D125011: [MSVC] Add support for pragma alloc_text

2022-05-12 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 some minor commenting nits that you can fix when landing. Can you also add a release note for the new pragma support? Comment at: clang/include

[PATCH] D125463: [analyzer][NFC] Tighten some of the SValBuilder return types

2022-05-12 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Seems like it compiles, so LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125463/new/ https://reviews.llvm.org/D125463 _

[PATCH] D125400: [clang][Analyzer] Add errno state to standard functions modeling.

2022-05-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Function `mkdir` is modeled incorrectly by the checker. According to the man page it can return 0 or -1 only (-1 is error) but the checker allows non-negative value at success. So the shown bug report is incorrect (it can be only -1 if not 0 and then check of `errno` i

[PATCH] D125383: [ASTMatchers][clang-tidy][NFC] Hoist 'forEachTemplateArgument' matcher into the core library

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Do you expect to use this matcher in a new check in the immediate future? We usually don't push specialized matchers into ASTMatchers.h but instead try to keep them next to the only check using them. This reduces compile time overhead for everyone building Clang.

[PATCH] D124996: [clang][preprocessor] Fix unsigned-ness of utf8 char literals

2022-05-12 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision as: tahonermann. tahonermann added a comment. This revision is now accepted and ready to land. Looks good, @tbaeder! Thank you for sticking with me through all these iterations! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124996/new/ https://reviews

[clang] 646e502 - [clang] add -fmodule-file-home-is-cwd

2022-05-12 Thread Richard Howell via cfe-commits
Author: Richard Howell Date: 2022-05-12T07:27:47-07:00 New Revision: 646e502de0d854cb3ecaca90ab52bebfe59a40cd URL: https://github.com/llvm/llvm-project/commit/646e502de0d854cb3ecaca90ab52bebfe59a40cd DIFF: https://github.com/llvm/llvm-project/commit/646e502de0d854cb3ecaca90ab52bebfe59a40cd.diff

[PATCH] D124874: [clang] add -fmodule-file-home-is-cwd

2022-05-12 Thread Richard Howell via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG646e502de0d8: [clang] add -fmodule-file-home-is-cwd (authored by rmaz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124874/new/ https://reviews.llvm.org/D

[clang] f110569 - [clang] serialize SUBMODULE_TOPHEADER relative to BaseDirectory

2022-05-12 Thread Richard Howell via cfe-commits
Author: Richard Howell Date: 2022-05-12T07:29:37-07:00 New Revision: f11056943e56a32d81bb36d11fb5ce8d2b2ce79b URL: https://github.com/llvm/llvm-project/commit/f11056943e56a32d81bb36d11fb5ce8d2b2ce79b DIFF: https://github.com/llvm/llvm-project/commit/f11056943e56a32d81bb36d11fb5ce8d2b2ce79b.diff

[PATCH] D124938: [clang] serialize SUBMODULE_TOPHEADER relative to BaseDirectory

2022-05-12 Thread Richard Howell via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf11056943e56: [clang] serialize SUBMODULE_TOPHEADER relative to BaseDirectory (authored by rmaz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124938/new/

[clang] ee51e97 - [clang] serialize ORIGINAL_PCH_DIR relative to BaseDirectory

2022-05-12 Thread Richard Howell via cfe-commits
Author: Richard Howell Date: 2022-05-12T07:31:19-07:00 New Revision: ee51e9795a31e1280e30179215c27e09927230e2 URL: https://github.com/llvm/llvm-project/commit/ee51e9795a31e1280e30179215c27e09927230e2 DIFF: https://github.com/llvm/llvm-project/commit/ee51e9795a31e1280e30179215c27e09927230e2.diff

[PATCH] D124946: [clang] serialize ORIGINAL_PCH_DIR relative to BaseDirectory

2022-05-12 Thread Richard Howell via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGee51e9795a31: [clang] serialize ORIGINAL_PCH_DIR relative to BaseDirectory (authored by rmaz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124946/new/ htt

[PATCH] D124702: [MSVC] Add support for pragma function

2022-05-12 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 428941. steplong added a comment. - Added test case for the `getRedeclContext()` case - Brought back `getRedeclContext()` - Clang-formatted - Added description in docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D125383: [ASTMatchers][clang-tidy][NFC] Hoist 'forEachTemplateArgument' matcher into the core library

2022-05-12 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D125383#3508960 , @aaron.ballman wrote: > Do you expect to use this matcher in a new check in the immediate future? D124446 would like to use it. Repository: rG LLVM Github Monorepo

[PATCH] D125468: [clangd] Include Cleaner: ignore headers with IWYU export pragmas

2022-05-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. Herald added a project: All. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-e

[PATCH] D125468: [clangd] Include Cleaner: ignore headers with IWYU export pragmas

2022-05-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 428947. kbobyrev added a comment. Remove unwanted formatting changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125468/new/ https://reviews.llvm.org/D125468 Files: clang-tools-extra/clangd/Headers.cpp

[PATCH] D125468: [clangd] Include Cleaner: ignore headers with IWYU export pragmas

2022-05-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 428949. kbobyrev added a comment. Remove redundant comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125468/new/ https://reviews.llvm.org/D125468 Files: clang-tools-extra/clangd/Headers.cpp clang-too

[PATCH] D124702: [MSVC] Add support for pragma function

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, thanks for all the work here! Comment at: clang/docs/ReleaseNotes.rst:272 +- Added support for MSVC's pragma function, which tells the compiler to + generate calls to functions lis

[PATCH] D125383: [ASTMatchers][clang-tidy][NFC] Hoist 'forEachTemplateArgument' matcher into the core library

2022-05-12 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. In D125383#3509023 , @whisperity wrote: > In D125383#3508960 , @aaron.ballman > wrote: > >> D

[PATCH] D125383: [ASTMatchers][clang-tidy][NFC] Hoist 'forEachTemplateArgument' matcher into the core library

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Oh, you should probably also add a release note for the new matcher to clang/docs/ReleaseNotes.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125383/new/ https://reviews.llvm.org/D125383 _

[PATCH] D121911: [Clang] Add DriverKit support

2022-05-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a subscriber: NoQ. arphaman added a comment. This revision is now accepted and ready to land. Herald added a subscriber: MaskRay. LGTM, with one request. Can you please take the static analyzer changes (RetainSummaryManager.h/cpp) and make them int

[PATCH] D122734: [CUDA][HIP] Fix mangling number for local struct

2022-05-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D122734#3508294 , @uabelho wrote: > Hi, > > I noticed when compiling with gcc 9.3.0 that we get a bunch of new warnings > with this patch: > > [1/351] Building CXX object > tools/clan

[PATCH] D124996: [clang][preprocessor] Fix unsigned-ness of utf8 char literals

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM as well, thank you for this! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124996/new/ https://reviews.llvm.org/D124996 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D125401: [OpenCL] Do not guard vload/store_half builtins

2022-05-12 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 428952. svenvh added a comment. Add test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125401/new/ https://reviews.llvm.org/D125401 Files: clang/lib/Headers/opencl-c-base.h clang/lib/Sema/OpenCLBuiltins.td clang/test/SemaOpenCL/half.cl

[PATCH] D105584: [MLIR][OpenMP] Distribute Construct Operation

2022-05-12 Thread Abid via Phabricator via cfe-commits
abidmalikwaterloo updated this revision to Diff 428955. abidmalikwaterloo added a comment. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. Added the assembly format, dist_schedule parser support Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D122126: [LoopVectorize] Don't interleave when the number of runtime checks exceeds the threshold

2022-05-12 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. LGTM with additional suggestions inline, thanks! Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:10462 +} else { + ORE->emit([&]() { +return OptimizationRemarkAnalysisAliasing( I

[PATCH] D124860: [clang][AArch64][SVE] Implicit conversions for vector-scalar operations

2022-05-12 Thread David Truby via Phabricator via cfe-commits
DavidTruby added a comment. I think this needs more tests to ensure every diagnostic is being triggered correctly so I will be adding those in another patch, but I wanted to put up the fix for the original issue as soon as possible! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[clang] 9766fed - [DeadArgElim] Re-apply: Set unused arguments for internal functions

2022-05-12 Thread Quentin Colombet via cfe-commits
Author: Quentin Colombet Date: 2022-05-12T08:46:16-07:00 New Revision: 9766fed9c10e8ba2f67fad0a3e8b509a8064f7b3 URL: https://github.com/llvm/llvm-project/commit/9766fed9c10e8ba2f67fad0a3e8b509a8064f7b3 DIFF: https://github.com/llvm/llvm-project/commit/9766fed9c10e8ba2f67fad0a3e8b509a8064f7b3.di

[PATCH] D124699: [DeadArgElim] Set unused arguments for internal functions

2022-05-12 Thread Quentin Colombet 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 rG9766fed9c10e: [DeadArgElim] Re-apply: Set unused arguments for internal functions (authored by qcolombet). Repository: rG LLVM Github Monorepo CH

[clang] 0f29214 - [clang]Silence warning in MicrosoftCXXABI.cpp

2022-05-12 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2022-05-12T12:04:05-04:00 New Revision: 0f292141aadb0489231de31de966c239486e019d URL: https://github.com/llvm/llvm-project/commit/0f292141aadb0489231de31de966c239486e019d DIFF: https://github.com/llvm/llvm-project/commit/0f292141aadb0489231de31de966c239486e019d.dif

[PATCH] D122734: [CUDA][HIP] Fix mangling number for local struct

2022-05-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D122734#3509096 , @yaxunl wrote: > In D122734#3508294 , @uabelho wrote: > >> Hi, >> >> I noticed when compiling with gcc 9.3.0 that we get a bunch of new warnings >> with this patch: >>

[PATCH] D123498: [clang] Adding Platform/Architecture Specific Resource Header Installation Targets

2022-05-12 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Headers/CMakeLists.txt:421 install( FILES ${ppc_wrapper_files} qiongsiwu1 wrote: > craig.topper wrote: > > There appear to be two installs of ppc_wrapper_files with different > > components. Is that

[PATCH] D125429: Comment parsing: Allow inline commands to have 0 or more than 1 argument

2022-05-12 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert marked an inline comment as done. aaronpuchert added inline comments. Comment at: clang/include/clang/AST/CommentCommands.td:93 +def N : InlineCommand<"n", 0>; + gribozavr2 wrote: > Could you add a test that shows that the text after \n is not

[PATCH] D125429: Comment parsing: Allow inline commands to have 0 or more than 1 argument

2022-05-12 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 428968. aaronpuchert marked an inline comment as done. aaronpuchert added a comment. Unify `Argument` types and parsing. Add AST test. Simplify TableGen. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125429

[PATCH] D124701: [clang] Honor __attribute__((no_builtin("foo"))) on functions

2022-05-12 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 428970. steplong edited the summary of this revision. steplong added a comment. - Added `isPredefinedLibFunction()` check - Added testcase for __attribute__((no_builtin("*"))) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D124915: Check for resource exhaustion when recursively parsing declarators

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 428969. aaron.ballman added a comment. Rebased. I removed the test coverage because it turned out to not be testing anything. If we exhaust resources, then we don't run the `-verify` to test the diagnostic behavior, and we're relying on the crash bein

[PATCH] D122747: [NFC][ARM] Tests for Cortex-A57 and Cortex-A72 Fused AES Erratum

2022-05-12 Thread Sam Elliott via Phabricator via cfe-commits
lenary updated this revision to Diff 428975. lenary added a comment. Herald added subscribers: cfe-commits, MaskRay, hiraditya, mgorny. Herald added a project: clang. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122747/new/ https://review

[clang] 7f9837c - [Headers][MSVC] Define wchar_t in stddef.h like MSVC if not using the builtin type

2022-05-12 Thread Stephen Long via cfe-commits
Author: Stephen Long Date: 2022-05-12T09:38:07-07:00 New Revision: 7f9837cfa63663ccd51da3e5de73acec8f776ee8 URL: https://github.com/llvm/llvm-project/commit/7f9837cfa63663ccd51da3e5de73acec8f776ee8 DIFF: https://github.com/llvm/llvm-project/commit/7f9837cfa63663ccd51da3e5de73acec8f776ee8.diff

[PATCH] D124026: [Headers][MSVC] Define wchar_t in stddef.h like MSVC if not using the builtin type

2022-05-12 Thread Stephen Long via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7f9837cfa636: [Headers][MSVC] Define wchar_t in stddef.h like MSVC if not using the builtin… (authored by steplong). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D119720: [ARM] Pass for Cortex-A57 and Cortex-A72 Fused AES Erratum

2022-05-12 Thread Sam Elliott via Phabricator via cfe-commits
lenary updated this revision to Diff 428978. lenary marked 3 inline comments as done. lenary added a comment. - Address comment nits - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119720/new/ https://reviews.llvm.org/D119720 Files: clang

[PATCH] D119720: [ARM] Pass for Cortex-A57 and Cortex-A72 Fused AES Erratum

2022-05-12 Thread Sam Elliott via Phabricator via cfe-commits
lenary marked 3 inline comments as done. lenary added inline comments. Comment at: llvm/lib/Target/ARM/ARMFixCortexA57AES1742098Pass.cpp:12-19 +// The intention is this: +// - Any 128-bit or 64-bit writes to the neon input register of an AES fused +// pair are safe (the inputs

[PATCH] D125473: Comment parsing: Treat properties as zero-argument inline commands

2022-05-12 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added a reviewer: gribozavr2. Herald added a project: All. aaronpuchert requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. That is more accurate, and using a separate class in TableGen seems app

[PATCH] D124702: [MSVC] Add support for pragma function

2022-05-12 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 428981. steplong added a comment. - Updated line in docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124702/new/ https://reviews.llvm.org/D124702 Files: clang/docs/ReleaseNotes.rst clang/include/clang/B

[PATCH] D123498: [clang] Adding Platform/Architecture Specific Resource Header Installation Targets

2022-05-12 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 added inline comments. Comment at: clang/lib/Headers/CMakeLists.txt:421 install( FILES ${ppc_wrapper_files} craig.topper wrote: > qiongsiwu1 wrote: > > craig.topper wrote: > > > There appear to be two installs of ppc_wrapper_files with different

[PATCH] D124701: [clang] Honor __attribute__((no_builtin("foo"))) on functions

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think the only thing missing is an update to the documentation: https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/AttrDocs.td#L5999, and add a release note about the change in functionality. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D124915: Check for resource exhaustion when recursively parsing declarators

2022-05-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I don't see how you can test this behavior without figuring out how to get a 'perfect' number to warn but not crash... The only way to validate that I would expect would be to do some bizarre flag that has us just 'don't run' in the case where the warning is emitted,

[PATCH] D124726: Suggest typoed directives in preprocessor conditionals

2022-05-12 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. Thank you for your review :) Comment at: clang/lib/Lex/PPDirectives.cpp:1257 // If we reached here, the preprocessing token is not valid! - Diag(Result, diag::err_pp_invalid_directive); + Diag(Result, diag::err_pp_invalid_directive) << 0;

[PATCH] D124726: Suggest typoed directives in preprocessor conditionals

2022-05-12 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui updated this revision to Diff 428983. ken-matsui added a comment. Update the code as reviewed and add a release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124726/new/ https://reviews.llvm.org/D124726 Files: clang/docs/ReleaseN

[PATCH] D124915: Check for resource exhaustion when recursively parsing declarators

2022-05-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Parse/Parser.cpp:2618 + // Only warn about this once. + if (!Actions.WarnedStackExhausted) { +Diag(Loc, diag::warn_stack_exhausted); Another concern here: Do we properly initialize "Actions" in the cas

[PATCH] D124726: Suggest typoed directives in preprocessor conditionals

2022-05-12 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui updated this revision to Diff 428985. ken-matsui added a comment. Add test for errored directive but no suggestion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124726/new/ https://reviews.llvm.org/D124726 Files: clang/docs/ReleaseNot

[PATCH] D121733: Clean pathnames in FileManager.

2022-05-12 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Basic/FileManager.cpp:218 + llvm::sys::path::remove_dots(CleanFilename, /*remove_dot_dot=*/false); + Filename = CleanFilename; + ppluzhnikov wrote: > kadircet wrote: > > this is actually breaking the [con

[PATCH] D124915: Check for resource exhaustion when recursively parsing declarators

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: clang/include/clang/Parse/Parser.h:802 + /// more in that case. Use this in code that may recurse deeply (for example, + /// in template instantiation) to avoid stack overflow. + v

[PATCH] D124915: Check for resource exhaustion when recursively parsing declarators

2022-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 428987. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Simplify the implementation by using the facilities Sema already exposes. The behavior remains the same: F:\source\llvm-project>llvm\out\build\x64-Debug\bin\clang.

[PATCH] D122747: [NFC][ARM] Tests for Cortex-A57 and Cortex-A72 Fused AES Erratum

2022-05-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The test file has 4000+ lines. Any chance making it smaller? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122747/new/ https://reviews.llvm.org/D122747 ___ cfe-commits mailing li

[PATCH] D124915: Check for resource exhaustion when recursively parsing declarators

2022-05-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. >> Another concern here: Do we properly initialize "Actions" in the case where >> we don't have a semantic Action? That is, if we are just preprocessing? Doh! Forgot we don't do 'Parse

  1   2   >