[clang-tools-extra] c2cc70e - [NFC] Fix endif comments to match with include guard

2022-01-06 Thread Qiu Chaofan via cfe-commits
Author: Qiu Chaofan Date: 2022-01-07T15:52:59+08:00 New Revision: c2cc70e4f534f445693d4ffb6fb8955c3e0bc2be URL: https://github.com/llvm/llvm-project/commit/c2cc70e4f534f445693d4ffb6fb8955c3e0bc2be DIFF: https://github.com/llvm/llvm-project/commit/c2cc70e4f534f445693d4ffb6fb8955c3e0bc2be.diff

[PATCH] D116713: [clangd] Support configuration of inlay hints.

2022-01-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/InlayHints.cpp:51 bool VisitCXXConstructExpr(CXXConstructExpr *E) { +if (!Cfg.InlayHints.DeducedTypes) + return true; this should be `!Cfg.InlayHints.ParameterNames`. What do you

[PATCH] D116793: [AST] Add more source information for DecltypeTypeLoc.

2022-01-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:1012 +// token doesn't have it. +DS.setTypeofParensRange(SourceRange(SourceLocation(), EndLoc)); ConsumeAnnotationToken(); This is unfortunate for a common case

[PATCH] D112718: Add intrinsics and builtins for PTX atomics with semantic orders

2022-01-06 Thread Tadej Ciglarič via Phabricator via cfe-commits
t4c1 added inline comments. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:1057 + +BUILTIN(__nvvm_atom_xchg_global_i, "iiD*i", "n") +TARGET_BUILTIN(__nvvm_atom_cta_xchg_global_i, "iiD*i", "n", SM_60) tra wrote: > We need to figure out how

[PATCH] D116378: [clang-tidy] Disable clang-tidy warnings from system macros

2022-01-06 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D116378#3226242 , @salman-javed-nz wrote: > This resolves the long-standing gripe I have with clang-tidy raising warnings > about GoogleTest macros expanded in my code. Good work. > Do you think we can close issues

[PATCH] D116793: [AST] Add more source information for DecltypeTypeLoc.

2022-01-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. hokein requested review of this revision. Herald added a subscriber: ilya-biryukov. Herald added projects: clang, clang-tools-extra. Adds the paren source location, and

[PATCH] D116792: [AST] lookup in parent DeclContext for transparent DeclContext

2022-01-06 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: erichkeane, rsmith, rjmccall, aaron.ballman, urnathan. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. The compiler would crash if we lookup for name in transparent

[PATCH] D116085: [clang-tidy] Performance improvements for NOLINTBEGIN/END blocks

2022-01-06 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz updated this revision to Diff 398048. salman-javed-nz added a comment. Herald added subscribers: usaxena95, arphaman, mgorny. Updated according to review comments - Move implementation to a CPP file. Use a PIMPL for access. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D116764: [clang][OpenMP5.1] Initial parsing/sema for 'indirect' clause

2022-01-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. Thanks Alexey for the code review. Comment at: clang/include/clang/Sema/Sema.h:10338 +Expr *IndirectExpr = nullptr; +bool IsIndirect = false; + ABataev wrote: > Can you use `Optional` instead of `Expr *` and `bool`? Good to know.

[PATCH] D116764: [clang][OpenMP5.1] Initial parsing/sema for 'indirect' clause

2022-01-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 398043. jyu2 added a comment. Address Alexey's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116764/new/ https://reviews.llvm.org/D116764 Files: clang/include/clang/Basic/Attr.td

[PATCH] D108694: [RISCV] Add the zvl extension according to the v1.0 spec

2022-01-06 Thread Shao-Ce SUN via Phabricator via cfe-commits
achieveartificialintelligence added inline comments. Comment at: llvm/lib/Target/RISCV/RISCV.td:155-187 +def FeatureStdExtZvl64b : SubtargetFeature<"experimental-zvl64b", "ZvlLen", "ExtZvl::Zvl64b", + "'Zvl' (Minimum Vector Length) 64", +

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (I know you're on vacation, this isn't urgent, just wanted to send it so I didn't lose it to git obscurity!) Comment at: clang-tools-extra/clangd/InlayHints.cpp:400 return false; -// Allow whitespace and "=" at end of comment. -

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: nridge. Herald added subscribers: usaxena95, kadircet, arphaman. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. These make the init

[PATCH] D93298: [RISCV] add the part of MC layer support of Zfinx extension

2022-01-06 Thread Shao-Ce SUN via Phabricator via cfe-commits
achieveartificialintelligence updated this revision to Diff 398031. achieveartificialintelligence marked an inline comment as done. achieveartificialintelligence added a comment. Inspired by D116019 , use multiclass in Alias Repository: rG LLVM Github

[PATCH] D116775: [clang][#47272] Avoid suggesting deprecated version of a declaration over another in typo correction

2022-01-06 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone requested changes to this revision. Quuxplusone added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Sema/SemaLookup.cpp:4345 + return; } } It seems like this code is overdue for a "compare these

[PATCH] D116256: [-fms-extensions] Make some exception specification warnings/errors compatible with what cl.exe does

2022-01-06 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116256/new/ https://reviews.llvm.org/D116256

[PATCH] D116425: [clang-tidy] Improve modernize-redundant-void-arg to recognize macro uses

2022-01-06 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561 +#define return_t(T) T +return_t(void) func(void); +// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in function declaration

[PATCH] D115393: [InstrProf][NFC] Refactor Profile kind into a bitset enum.

2022-01-06 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish updated this revision to Diff 398018. snehasish added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115393/new/ https://reviews.llvm.org/D115393 Files: llvm/include/llvm/ProfileData/InstrProf.h

[PATCH] D113049: [AIX] Disable tests that fail because of no 64-bit XCOFF object file support

2022-01-06 Thread ChenZheng via Phabricator via cfe-commits
shchenz accepted this revision. shchenz added a comment. This revision is now accepted and ready to land. LGTM. Thanks for the explanation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113049/new/ https://reviews.llvm.org/D113049

[PATCH] D116059: [Clang][CFG] check children statements of asm goto

2022-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked an inline comment as done. nickdesaulniers added inline comments. Comment at: clang/test/Analysis/uninit-asm-goto.cpp:84 + +int test8() { +int x = 0; // expected-warning {{variable 'x' is used uninitialized whenever its declaration is reached}}

[PATCH] D116778: [clang-tidy][clang] Don't trigger unused-parameter warnings on naked functions

2022-01-06 Thread Tommaso Bonvicini via Phabricator via cfe-commits
MuAlphaOmegaEpsilon created this revision. MuAlphaOmegaEpsilon added a reviewer: aaron.ballman. Herald added subscribers: carlosgalvezp, xazax.hun. MuAlphaOmegaEpsilon requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. This

[PATCH] D115103: Leak Sanitizer port to Windows

2022-01-06 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. It does work indeed. I am running under a "x64 Native Tools Command Prompt for VS 2019" prompt with MSVC 16.11.8. D:\git\llvm-project>mkdir release && cd release D:\git\llvm-project\release>cmake ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lld;llvm;compiler-rt"

[PATCH] D116059: [Clang][CFG] check children statements of asm goto

2022-01-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. LGTM Comment at: clang/test/Analysis/uninit-asm-goto.cpp:84 + +int test8() { +int x = 0; // expected-warning {{variable 'x' is used uninitialized whenever its declaration is reached}} Looks like

[PATCH] D116775: [clang][#47272] Avoid suggesting deprecated version of a declaration over another in typo correction

2022-01-06 Thread Markus Böck via Phabricator via cfe-commits
zero9178 created this revision. zero9178 added reviewers: Quuxplusone, aaron.ballman, rsmith. zero9178 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Prior to this patch, clang might suggest a deprecated name of a declaration over

[PATCH] D104830: AST: Create __va_list in the std namespace even in C.

2022-01-06 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D104830#3225370 , @jrtc27 wrote: > Ping? Sorry for the delay, D116774 should fix this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104830/new/

[PATCH] D116774: AST: Move __va_list tag to the top level on ARM architectures.

2022-01-06 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: rsmith, eugenis, jrtc27. Herald added a subscriber: kristof.beyls. pcc requested review of this revision. Herald added a project: clang. In post-commit feedback on D104830 Jessica Clarke pointed out that

[PATCH] D116773: AST: Make getEffectiveDeclContext() a member function of ItaniumMangleContextImpl. NFCI.

2022-01-06 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: eugenis, rsmith, jrtc27. pcc requested review of this revision. Herald added a project: clang. In an upcoming change we are going to need to access mangler state from the getEffectiveDeclContext() function. Therefore, make it a member function of

[PATCH] D116378: [clang-tidy] Disable clang-tidy warnings from system macros

2022-01-06 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz added a comment. This resolves the long-standing gripe I have with clang-tidy raising warnings about GoogleTest macros expanded in my code. Good work. Do you think we can close issues #44873 , #43325

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:1675 + PosFlag, NegFlag, + BothFlags<[], "Detect uninitialized parameters and return values.">>, +Group; MaskRay wrote: > `--help` messages don't have periods. Does

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This needs a clang/test/Driver test to show that `%clang -fsanitize-memory-param-retval` translates to CC1 `-fsanitize-memory-param-retval`. Comment at: clang/include/clang/Driver/Options.td:1675 + PosFlag, NegFlag, + BothFlags<[], "Detect

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2022-01-06 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D86310#3226142 , @rnk wrote: > In D86310#2736983 , @hvdijk wrote: > >> There is a risk of bitcode incompatibilities with this change, but we >> already have that the code we generate now

[PATCH] D115103: Leak Sanitizer port to Windows

2022-01-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: aganea. rnk added a comment. See a recent change rG7cd109b92c72855937273a6c8ab19016fbe27d33 by @aganea, who presumably was able to run the ASan tests for it. CHANGES SINCE LAST ACTION

[PATCH] D115103: Leak Sanitizer port to Windows

2022-01-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D115103#3209468 , @vitalybuka wrote: > In D115103#3209326 , @clemenswasser > wrote: > >> @vitalybuka >> No `check-asan` **doesn't work** for me. It just hangs forever and does >>

[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

2022-01-06 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Also, re-reading the C++ guidelines, I agree that this check is handling the two cases ES.31 (Don't use macros for constants and functions) ES.33 (Don't use macros that aren't all caps) I guess previously it **technically** handled ES.30 (don't use macros for

[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

2022-01-06 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Aaron, I think your comments are useful and I would be inclined to agree with you if I was the original author of this check. I treat the guidelines as just that: guidelines, not rules. In the context of clang-tidy I think you're correct that some

[PATCH] D115441: [X86][MS] Add 80bit long double support for Windows

2022-01-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. lgtm I believe you can go ahead and land this, it doesn't depend on the data layout changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115441/new/ https://reviews.llvm.org/D115441

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-06 Thread Elvis Stansvik via Phabricator via cfe-commits
estan added a comment. Alright, yea I'll see what using std::array would mean for our code. In many cases we are just using plain arrays currently, and often they are just a way to get data in/out of these APIs (and for the out direction, we quickly go on to saving the data we got out into

[PATCH] D112718: Add intrinsics and builtins for PTX atomics with semantic orders

2022-01-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:1057 + +BUILTIN(__nvvm_atom_xchg_global_i, "iiD*i", "n") +TARGET_BUILTIN(__nvvm_atom_cta_xchg_global_i, "iiD*i", "n", SM_60) We need to figure out how address-space-specific

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk requested changes to this revision. rnk added a comment. This revision now requires changes to proceed. Yeah, let's try to reach some resolution on that. In the mean time, I discovered the `alignstack` parameter attribute: https://llvm.org/docs/LangRef.html#parameter-attributes Could that

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2022-01-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Herald added a subscriber: ormris. In D86310#2231378 , @efriedma wrote: > As far as I know, there are basically three categories of things that depend > on the alignment of a type. > > 1. The default alignment of load/store/alloca.

[PATCH] D116767: [clang-format] Fix `BraceWrapping: AfterFunction` affecting synchronized blocks in Java.

2022-01-06 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/32031. Before this change,

[PATCH] D116635: Add warning to detect when calls passing arguments are made to functions without prototypes.

2022-01-06 Thread Dan Liew via Phabricator via cfe-commits
delcypher added inline comments. Comment at: clang/test/Sema/warn-calls-without-prototype.c:39 + return a + b +c; +} + aaron.ballman wrote: > delcypher wrote: > > NoQ wrote: > > > delcypher wrote: > > > > delcypher wrote: > > > > > delcypher wrote: > > > > > >

[PATCH] D116059: [Clang][CFG] check children statements of asm goto

2022-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 397983. nickdesaulniers added a comment. This revision is now accepted and ready to land. - MOAR TESTS RAWR!!1one Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116059/new/

[PATCH] D116764: [clang][OpenMP5.1] Initial parsing/sema for 'indirect' clause

2022-01-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Sema/Sema.h:10338 +Expr *IndirectExpr = nullptr; +bool IsIndirect = false; + Can you use `Optional` instead of `Expr *` and `bool`? Comment at:

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a subscriber: efriedma. craig.topper added a comment. Does this have the same autoupgrade issues as @efriedma raised in https://reviews.llvm.org/D86310 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115942/new/

[PATCH] D116370: [clang][dataflow] Add multi-variable constant propagation example.

2022-01-06 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp:104 + } +} + Hello! I commit a tiny fix here, please see: rGa5af260d3e8b00a3353e813b73f83391edbef493 Repository: rG LLVM Github Monorepo

[clang] a5af260 - Silence warning with MSVC compiler.

2022-01-06 Thread Alexandre Ganea via cfe-commits
Author: Alexandre Ganea Date: 2022-01-06T16:51:37-05:00 New Revision: a5af260d3e8b00a3353e813b73f83391edbef493 URL: https://github.com/llvm/llvm-project/commit/a5af260d3e8b00a3353e813b73f83391edbef493 DIFF:

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added subscribers: jyknight, thakis. rnk added a comment. This revision is now accepted and ready to land. Thanks, looks good. I have a minor code refactoring suggestion, but feel free to resolve it as you see fit and land it. Comment at:

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-06 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. I see, thanks for the examples! Since you mention modern C++, I can guess you are using std::array in your code. Maybe just pass "buffer.data()" to the third-party functions? I think it's a bit cleaner than casts. If you use C arrays, consider switching to

[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

2022-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman edited reviewers, added: hokein, whisperity, njames93; removed: aaron.ballman. aaron.ballman added a comment. Herald added a subscriber: rnkovacs. We run into this problem quite frequently -- the C++ Core Guidelines put very little effort into thinking about enforcement, and so

[PATCH] D116635: Add warning to detect when calls passing arguments are made to functions without prototypes.

2022-01-06 Thread Dan Liew via Phabricator via cfe-commits
delcypher added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5529 +def warn_call_function_without_prototype : Warning< + "calling function %0 with arguments when function has no prototype">, InGroup< +

[PATCH] D114206: [Clang][ScanDeps] Use the virtual path for module maps

2022-01-06 Thread Sam Elliott via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG37e6e022d21f: Re-land [Clang][ScanDeps] Use the virtual path for module maps (authored by Bigcheese, committed by lenary). Changed prior to commit: https://reviews.llvm.org/D114206?vs=394303=397972#toc

[clang] 37e6e02 - Re-land "[Clang][ScanDeps] Use the virtual path for module maps"

2022-01-06 Thread Archibald Elliott via cfe-commits
Author: Michael Spencer Date: 2022-01-06T21:05:05Z New Revision: 37e6e022d21fc9e188701c684dc0f6a13366ddf9 URL: https://github.com/llvm/llvm-project/commit/37e6e022d21fc9e188701c684dc0f6a13366ddf9 DIFF: https://github.com/llvm/llvm-project/commit/37e6e022d21fc9e188701c684dc0f6a13366ddf9.diff

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-06 Thread Elvis Stansvik via Phabricator via cfe-commits
estan added a comment. Yep thanks a lot for that @carlosgalvezp, getting the system macros sorted out will get rid of many warnings we were getting in our code base (seems the qDebug / qWarning macros in the Qt version we're are using violate this check on their own). Regarding decay in calls

[PATCH] D114787: [clang][PR51931] Enable `-Wdeclaration-after-statement` for all C versions

2022-01-06 Thread Markus Böck via Phabricator via cfe-commits
zero9178 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9865 def ext_mixed_decls_code : Extension< "ISO C90 forbids mixing declarations and code">, + InGroup; aaron.ballman wrote: > In the other review, I left a comment

[PATCH] D114787: [clang][PR51931] Enable `-Wdeclaration-after-statement` for all C versions

2022-01-06 Thread Markus Böck via Phabricator via cfe-commits
zero9178 updated this revision to Diff 397971. zero9178 marked an inline comment as done. zero9178 added a comment. Improved error messages and adjusted tests accordingly CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114787/new/ https://reviews.llvm.org/D114787 Files:

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-06 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. My patch has now been merged, hope it helps a bit! Reading through the comments I'm not sure it will be enough though. In the cases you mention we've typically wrapped the third-party function into a helper function that adds a

[PATCH] D116764: [clang][OpenMP5.1] Initial parsing/sema for 'indirect' clause

2022-01-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: ABataev, mikerice, jdoerfert. jyu2 added a project: clang. Herald added subscribers: guansong, yaxunl. Herald added a reviewer: aaron.ballman. Herald added a project: Flang. jyu2 requested review of this revision. Herald added subscribers:

[PATCH] D116059: [Clang][CFG] check children statements of asm goto

2022-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers planned changes to this revision. nickdesaulniers added a comment. will add more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116059/new/ https://reviews.llvm.org/D116059 ___

[PATCH] D116059: [Clang][CFG] check children statements of asm goto

2022-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 397965. nickdesaulniers added a comment. This revision is now accepted and ready to land. - add previously red -Warray-bounds test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116059/new/

[PATCH] D116378: [clang-tidy] Disable clang-tidy warnings from system macros

2022-01-06 Thread Carlos Galvez 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 rG670de10f9dea: Disable clang-tidy warnings from system macros (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang-tools-extra] 670de10 - Disable clang-tidy warnings from system macros

2022-01-06 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2022-01-06T20:27:28Z New Revision: 670de10f9deaa83f4d1db6e793c74cbfd18c65c1 URL: https://github.com/llvm/llvm-project/commit/670de10f9deaa83f4d1db6e793c74cbfd18c65c1 DIFF: https://github.com/llvm/llvm-project/commit/670de10f9deaa83f4d1db6e793c74cbfd18c65c1.diff

[PATCH] D116378: [clang-tidy] Disable clang-tidy warnings from system macros

2022-01-06 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks for the review! I've fixed the nit, reverted unrelated changes to backticks and moved the class to the existing anonymous namespace. Since those are NFC changes I'll push now, if you don't agree let me know and I'll revert right away :)

[PATCH] D116059: [Clang][CFG] check children statements of asm goto

2022-01-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Yes, messed up the warning flag. Did some brief experiments on trunk; I'd like to see the following two testcases as regression tests: int a(int z) { int x; if (z) asm goto ("":"=r"(x):::A1,A2); return 0; A1: A2: return x;

[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

2022-01-06 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Can someone look at this review please, it's not that long and/or complicated. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116386/new/ https://reviews.llvm.org/D116386 ___ cfe-commits mailing

[PATCH] D116378: [clang-tidy] Disable clang-tidy warnings from system macros

2022-01-06 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 397958. carlosgalvezp added a comment. - Refactor duplicated warning message into a common variable. - Remove double backticks change, TBH I get conflicting review comments about this and can't find any docs supporting either, so I'll just keep it

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-06 Thread Elvis Stansvik via Phabricator via cfe-commits
estan added a comment. In D88833#3225842 , @aaron.ballman wrote: > In D88833#3224389 , @carlosgalvezp > wrote: > >> Please note: I have a patch that disables warnings from system macros for >> all clang-tidy

[PATCH] D116635: Add warning to detect when calls passing arguments are made to functions without prototypes.

2022-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5529 +def warn_call_function_without_prototype : Warning< + "calling function %0 with arguments when function has no prototype">, InGroup< +

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-06 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2384 +if ((CodeGenOpts.EnableNoundefAttrs || + CodeGenOpts.SanitizeMemoryParamRetval) && +ArgNoUndef) vitalybuka wrote: > vitalybuka wrote: > > kda wrote: > > > eugenis

[PATCH] D114425: [clang] Add __builtin_bswap128

2022-01-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D114425#3225892 , @craig.topper wrote: > I kind of wonder if we should detect the __int128 type being requested in > ASTContext::GetBuiltinType and return an error up to > Sema::LazilyCreateBuiltin. Probably requires a

[PATCH] D116059: [Clang][CFG] check children statements of asm goto

2022-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D116059#3225862 , @efriedma wrote: > Do we have testcases for how -Wuninitialized/-Wmaybe-uninitialized interact > with asm goto? We have tests for `-Wuninitialized`; clang/test/Analysis/uninit-asm-goto.cpp (D71314

[PATCH] D116385: [clangd] Code action for creating an ObjC initializer

2022-01-06 Thread David Goldman via Phabricator via cfe-commits
dgoldman marked 3 inline comments as done. dgoldman added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp:265 + // Insert before the first non-init instance method. + std::vector Anchors = { + {[](const Decl *D) {

[PATCH] D114601: Read path to CUDA from env. variable CUDA_PATH on Windows

2022-01-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D114601#3224469 , @mojca wrote: > In D114601#3223155 , @tra wrote: > >> Ping. @mojca, do you need help landing the patch? > > Yes, please. I don't have commit access yet. > You can

[PATCH] D116385: [clangd] Code action for creating an ObjC initializer

2022-01-06 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 397956. dgoldman marked an inline comment as done. dgoldman added a comment. Support generating interface and impl Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116385/new/ https://reviews.llvm.org/D116385

[PATCH] D114425: [clang] Add __builtin_bswap128

2022-01-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added reviewers: aaron.ballman, erichkeane. craig.topper added a comment. I kind of wonder if we should detect the __int128 type being requested in ASTContext::GetBuiltinType and return an error up to Sema::LazilyCreateBuiltin. Probably requires a new error code and handling for it

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-06 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. I don't think we need -Xclang? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 ___ cfe-commits mailing list

[PATCH] D116726: [clang-format] Fix a crash (assertion) in qualifier alignment when matching template closer is null

2022-01-06 Thread MyDeveloperDay 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 rG031d3ece3f2e: [clang-format] Fix a crash (assertion) in qualifier alignment when matching… (authored by MyDeveloperDay). Repository: rG LLVM

[clang] 031d3ec - [clang-format] Fix a crash (assertion) in qualifier alignment when matching template closer is null

2022-01-06 Thread via cfe-commits
Author: mydeveloperday Date: 2022-01-06T19:40:39Z New Revision: 031d3ece3f2eb6bd785dcf7484e88cc6a306db94 URL: https://github.com/llvm/llvm-project/commit/031d3ece3f2eb6bd785dcf7484e88cc6a306db94 DIFF: https://github.com/llvm/llvm-project/commit/031d3ece3f2eb6bd785dcf7484e88cc6a306db94.diff

[PATCH] D116059: [Clang][CFG] check children statements of asm goto

2022-01-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Do we have testcases for how -Wuninitialized/-Wmaybe-uninitialized interact with asm goto? If not, can you add them? Also, an explicit test for -Warray-bounds or whatever would be nice, although I guess the CFG tests sort of cover that. Repository: rG LLVM Github

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. There we go, now precommit CI is happy; LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337

[PATCH] D88833: [clang-tidy] Do not warn on pointer decays in system macros

2022-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D88833#3224389 , @carlosgalvezp wrote: > Please note: I have a patch that disables warnings from system macros for all > clang-tidy warnings, it would be good to review it so we don't need to > implement the same

[PATCH] D116635: Add warning to detect when calls passing arguments are made to functions without prototypes.

2022-01-06 Thread Dan Liew via Phabricator via cfe-commits
delcypher added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5529 +def warn_call_function_without_prototype : Warning< + "calling function %0 with arguments when function has no prototype">, InGroup< +

[PATCH] D116673: [Clang][NVPTX]Add NVPTX intrinsics and builtins for CUDA PTX cvt sm80 instructions

2022-01-06 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/test/CodeGen/builtins-nvptx.c:760 +// CHECK-LABEL: nvvm_cvt_sm80 +__device__ void nvvm_cvt_sm80() { +#if __CUDA_ARCH__ >= 800 Can you try

[PATCH] D116378: [clang-tidy] Disable clang-tidy warnings from system macros

2022-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a minor nit, thanks! This was a good catch. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp:32-33 +

[PATCH] D116635: Add warning to detect when calls passing arguments are made to functions without prototypes.

2022-01-06 Thread Dan Liew via Phabricator via cfe-commits
delcypher added inline comments. Comment at: clang/test/Sema/warn-calls-without-prototype.c:39 + return a + b +c; +} + NoQ wrote: > delcypher wrote: > > delcypher wrote: > > > delcypher wrote: > > > > @NoQ Any ideas about this? It seems kind of weird that when

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-06 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 397938. alxu added a comment. Re-add context lines. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 Files: clang/lib/Frontend/InitPreprocessor.cpp clang/test/Preprocessor/init-aarch64.c

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-06 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 397937. alxu added a comment. Herald added subscribers: aheejin, dschuff. Update init.c, init-aarch64.c tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 Files: clang/lib/Frontend/InitPreprocessor.cpp

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Getting closer! Now there are new CI pipeline failures (some tests look like they need updating). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 ___ cfe-commits

[PATCH] D116256: [-fms-extensions] Make some exception specification warnings/errors compatible with what cl.exe does

2022-01-06 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 397930. akhuang marked an inline comment as done. akhuang added a comment. Add std=c++17 to the test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116256/new/ https://reviews.llvm.org/D116256 Files:

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for your patience! I finally had the chance to go through this a bit more. I identified a bunch of tiny nits (the review feedback may look scary, but most should be trivial changes), but a few larger things about the design as well that are worth

[PATCH] D116755: Revert "[CodeGen] Mark fma as const for Android"

2022-01-06 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama accepted this revision. pirama added a subscriber: srhines. pirama added a comment. This revision is now accepted and ready to land. Thanks for the cleanup here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116755/new/

[PATCH] D116549: [OpenMP][Clang] Allow passing target features in ISA trait for metadirective clause

2022-01-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2533 +std::function DiagUnknownTrait = [this, Loc]( +StringRef ISATrait) {}; +TargetOMPContext OMPCtx(ASTContext,

[PATCH] D114206: [Clang][ScanDeps] Use the virtual path for module maps

2022-01-06 Thread Sam Elliott via Phabricator via cfe-commits
lenary accepted this revision. lenary added a comment. This revision is now accepted and ready to land. @Bigcheese I am sorry - after a lot of further investigation, it was due to an odd interaction with some downstream changes. I will re-land your changes, with correct attribution to you.

[PATCH] D116337: [clang] set __NO_MATH_ERRNO__ if -fno-math-errno

2022-01-06 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu updated this revision to Diff 397922. alxu added a comment. Correct logic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116337/new/ https://reviews.llvm.org/D116337 Files: clang/lib/Frontend/InitPreprocessor.cpp clang/test/Preprocessor/predefined-macros.c Index:

[PATCH] D116726: [clang-format] Fix a crash (assertion) in qualifier alignment when matching template closer is null

2022-01-06 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Cool. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116726/new/ https://reviews.llvm.org/D116726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D116755: Revert "[CodeGen] Mark fma as const for Android"

2022-01-06 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu created this revision. alxu added a project: clang. Herald added a subscriber: danielkiss. alxu requested review of this revision. Herald added a subscriber: cfe-commits. This code is intended to give a special exception for platforms which set errno in some math functions but not fma. This

[PATCH] D106518: [RISCV] Disable EEW=64 for index values when XLEN=32.

2022-01-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:5475 + if (IndexVT.getVectorElementType() == MVT::i64 && XLenVT == MVT::i32) { +report_fatal_error("The V extension does not support EEW=64 for index " Can we

[PATCH] D91000: [clang-tidy] Add cert-msc24-c checker.

2022-01-06 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D91000#3225369 , @balazske wrote: > The functions `asctime` and `asctime_r` are discouraged according to CERT > MSC33-C rule. These could be added to this check as well. There is a clang SA > checker `SecuritySyntaxChecker`

[PATCH] D116753: Default to -fno-math-errno for musl too

2022-01-06 Thread Alex Xu (Hello71) via Phabricator via cfe-commits
alxu created this revision. alxu added a project: clang. alxu requested review of this revision. Herald added a subscriber: cfe-commits. musl does not set errno in math functions: https://wiki.musl-libc.org/mathematical-library.html,

[PATCH] D112913: Misleading bidirectional detection

2022-01-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Note that if there's a consensus on it, I can implement LRM character support. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112913/new/ https://reviews.llvm.org/D112913 ___ cfe-commits mailing list

  1   2   >