[PATCH] D112881: [clang-tidy] Allow disabling integer to floating-point narrowing conversions for cppcoreguidelines-narrowing-conversions

2021-11-29 Thread Paul Altin via Phabricator via cfe-commits
paulaltin added a comment. > LGTM, with a few small nits. It'd be nice to update the patch summary with > more information about why the option is needed. Thanks @aaron.ballman. I've made the changes to the Release Notes and added more info to the summary. In general, would you be happy to

[PATCH] D114776: [clang-offload-bundler] Reuse original file extension for device archive member

2021-11-29 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev created this revision. sdmitriev added reviewers: saiislam, ABataev. sdmitriev requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. This patch changes clang-offload-bundler to use the

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 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 rG5bbe50148f3b: [clang-tidy] Warn on functional C-style casts (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang-tools-extra] 5bbe501 - [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2021-11-30T07:31:17Z New Revision: 5bbe50148f3b515c170be22209395b72890f5b8c URL: https://github.com/llvm/llvm-project/commit/5bbe50148f3b515c170be22209395b72890f5b8c DIFF: https://github.com/llvm/llvm-project/commit/5bbe50148f3b515c170be22209395b72890f5b8c.diff

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks a lot for the review! I've fixed the last comment by @salman-javed-nz . Since that was the last standing comment I'll push :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 390580. carlosgalvezp added a comment. Fixed doc. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427 Files: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp

[PATCH] D112881: [clang-tidy] Allow disabling integer to floating-point narrowing conversions for cppcoreguidelines-narrowing-conversions

2021-11-29 Thread Paul Altin via Phabricator via cfe-commits
paulaltin updated this revision to Diff 390573. paulaltin edited the summary of this revision. paulaltin added a comment. Fixing doc formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112881/new/ https://reviews.llvm.org/D112881 Files:

[PATCH] D114769: [C++20] [Modules] [Concepts] Recognize same concepts more precisely in Serialization

2021-11-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 390572. ChuanqiXu added a comment. Clean code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114769/new/ https://reviews.llvm.org/D114769 Files: clang/lib/Serialization/ASTReaderDecl.cpp

[PATCH] D114769: [C++20] [Modules] [Concepts] Recognize same concepts more precisely in Serialization

2021-11-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, aaron.ballman, urnathan, saar.raz. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. When we use concept in modules, we would meet a curious error. For example:

[PATCH] D114162: [X86][clang] Enable floating-point type for -mno-x87 option on 32-bits

2021-11-29 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG42c15c7edf17: [X86][clang] Enable floating-point type for -mno-x87 option on 32-bits (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 42c15c7 - [X86][clang] Enable floating-point type for -mno-x87 option on 32-bits

2021-11-29 Thread Phoebe Wang via cfe-commits
Author: Phoebe Wang Date: 2021-11-30T14:08:10+08:00 New Revision: 42c15c7edf174fc7a45131a1b89ee816fada7633 URL: https://github.com/llvm/llvm-project/commit/42c15c7edf174fc7a45131a1b89ee816fada7633 DIFF: https://github.com/llvm/llvm-project/commit/42c15c7edf174fc7a45131a1b89ee816fada7633.diff

[PATCH] D114408: Fold a lot of ffixed_x if judgments

2021-11-29 Thread Shao-Ce SUN via Phabricator via cfe-commits
achieveartificialintelligence abandoned this revision. achieveartificialintelligence added a comment. In D114408#3148311 , @jrtc27 wrote: > This has clearly not been tested whatsoever, it’s totally broken, the > preprocessor does not work like that

[PATCH] D114163: Use VersionTuple for parsing versions in Triple. This makes it possible to distinguish between "16" and "16.0" after parsing, which previously was not possible.

2021-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. Sorry for delay, this LGTM. Thanks for doing this cleanup! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114163/new/

[PATCH] D114764: Use `thin` that starts with lowercase letter. - `Thin` gives an error when following https://clang.llvm.org/docs/ThinLTO.html#clang-bootstrap, and `thin` works.

2021-11-29 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D114764#3160212 , @luna wrote: > In D114764#3160204 , @tejohnson > wrote: > >> There are some other docs that also use "Thin" (and "Full", etc). I see my >> own script uses "THIN"

[PATCH] D114764: Use `thin` that starts with lowercase letter. - `Thin` gives an error when following https://clang.llvm.org/docs/ThinLTO.html#clang-bootstrap, and `thin` works.

2021-11-29 Thread Mingming Liu via Phabricator via cfe-commits
luna added a comment. In D114764#3160204 , @tejohnson wrote: > There are some other docs that also use "Thin" (and "Full", etc). I see my > own script uses "THIN" for this cmake variable. Looks like we convert to > uppercase so I wouldn't think it

[PATCH] D114764: Use `thin` that starts with lowercase letter. - `Thin` gives an error when following lib/Transforms/IPO/WholeProgramDevirt.cpp, and `thin` works.

2021-11-29 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. There are some other docs that also use "Thin" (and "Full", etc). I see my own script uses "THIN" for this cmake variable. Looks like we convert to uppercase so I wouldn't think it should matter: See llvm/cmake/modules/HandleLLVMOptions.cmake:30 Can you clarify what

[PATCH] D114764: Use `thin` that starts with lowercase letter. - `Thin` gives an error when following lib/Transforms/IPO/WholeProgramDevirt.cpp, and `thin` works.

2021-11-29 Thread Mingming Liu via Phabricator via cfe-commits
luna created this revision. luna added a reviewer: tejohnson. Herald added subscribers: ormris, steven_wu, hiraditya. luna requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix a typo. Repository: rG LLVM Github Monorepo

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-11-29 Thread Kyungwoo Lee via Phabricator via cfe-commits
kyulee added inline comments. Comment at: compiler-rt/lib/profile/InstrProfilingWriter.c:273 - if (!DataSize) + if (!CountersSize) return 0; Is it no diff change? I wonder if there is a case where `CountersSize` is 0 but not `DataSize` from a value

[PATCH] D114095: [clang][lex] Include tracking: simplify and move to preprocessor

2021-11-29 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. I've mentioned it in D112915 as we've discussed the stored data format there. But my concern was that bitvector packing might be not the most space-efficient encoding. I haven't done proper testing, just off-the-cuff comparison and it

[PATCH] D114758: [analyzer][solver] Introduce reasoning for not equal to operator

2021-11-29 Thread Manas Gupta via Phabricator via cfe-commits
manas added a comment. Closing this as this is mistakenly a duplicate of existing differential D112621 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114758/new/ https://reviews.llvm.org/D114758

[PATCH] D112621: [analyzer][solver] Introduce reasoning for not equal to operator

2021-11-29 Thread Manas Gupta via Phabricator via cfe-commits
manas added a comment. I have made few changes: 1. The failed assertions due to comparison between different types have been fixed by converting all the Ranges to a given type. This will allow comparisons without throwing errors. 2. There was also a build

[PATCH] D112621: [analyzer][solver] Introduce reasoning for not equal to operator

2021-11-29 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 390526. manas added a comment. Fix comparison between different types and add a test to check it Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112621/new/ https://reviews.llvm.org/D112621 Files:

[PATCH] D114565: [InstrProf] Attach debug info to counters

2021-11-29 Thread Ellis Hoag via Phabricator via cfe-commits
ellis created this revision. Herald added subscribers: ormris, wenlei, hiraditya. ellis edited the summary of this revision. ellis added reviewers: MaskRay, alanphipps, wenlei, kyulee, davidxl. ellis edited the summary of this revision. ellis published this revision for review. Herald added

[PATCH] D114758: [analyzer][solver] Introduce reasoning for not equal to operator

2021-11-29 Thread Manas Gupta via Phabricator via cfe-commits
manas created this revision. Herald added subscribers: steakhal, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. manas requested review of this revision. Herald added a project: clang. Herald added a subscriber:

[PATCH] D114639: Raise the minimum Visual Studio version to VS2019

2021-11-29 Thread Stella Stamenova via Phabricator via cfe-commits
stella.stamenova added a comment. In D114639#3160031 , @mehdi_amini wrote: > In D114639#3158401 , @RKSimon wrote: > >>> Have you checked whether there are any bots in the lab that will need to be >>> updated?

[PATCH] D114639: Raise the minimum Visual Studio version to VS2019

2021-11-29 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D114639#3158401 , @RKSimon wrote: >> Have you checked whether there are any bots in the lab that will need to be >> updated? > > I did find a number of bots that I think need addressing, I am intending to > privately

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-11-29 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 390521. samitolvanen added a comment. Use standard l-value conversions, and add a test case for `constexpr`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108479/new/ https://reviews.llvm.org/D108479

[PATCH] D113995: [clangd] Dex Trigrams: Improve query trigram generation

2021-11-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Basically LG now, some of the changes are a bit mysterious to me though Comment at: clang-tools-extra/clangd/index/dex/Trigram.cpp:47 + const size_t NPOS = std::numeric_limits::max(); + llvm::SmallVector> Next(LowercaseIdentifier.size()); +

[PATCH] D114149: [clang-tidy] Fix pr48613: "llvm-header-guard uses a reserved identifier"

2021-11-29 Thread Salman Javed via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc7aa358798e6: [clang-tidy] Fix pr48613: llvm-header-guard uses a reserved identifier (authored by salman-javed-nz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] c7aa358 - [clang-tidy] Fix pr48613: "llvm-header-guard uses a reserved identifier"

2021-11-29 Thread Salman Javed via cfe-commits
Author: Salman Javed Date: 2021-11-30T12:43:35+13:00 New Revision: c7aa358798e6330593fd5cc2ff4caf6bc15ba3c9 URL: https://github.com/llvm/llvm-project/commit/c7aa358798e6330593fd5cc2ff4caf6bc15ba3c9 DIFF: https://github.com/llvm/llvm-project/commit/c7aa358798e6330593fd5cc2ff4caf6bc15ba3c9.diff

[PATCH] D113254: [clang] Fix a misadjusted path style comparison in a unittest

2021-11-29 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping @dexonsmith Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113254/new/ https://reviews.llvm.org/D113254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D114149: [clang-tidy] Fix pr48613: "llvm-header-guard uses a reserved identifier"

2021-11-29 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz updated this revision to Diff 390464. salman-javed-nz added a comment. Update "iff" comment based on review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114149/new/ https://reviews.llvm.org/D114149 Files:

[PATCH] D114724: [clangd][StdSymbolMap] Prefer std::remove from algorithm

2021-11-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/StdSymbolMap.inc:958 SYMBOL(remainder, std::, ) -SYMBOL(remove, std::, ) SYMBOL(remove_all_extents, std::, ) Is the stdio version so uncommon we are willing to be wrong about it? For `move`

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-29 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:1037 + "void foo(struct Param { int a; } *p);", Lang_C89); + EXPECT_TRUE(testStructuralMatch(Decls)); +} I expect this to be `false` the outer

[PATCH] D114095: [clang][lex] Include tracking: simplify and move to preprocessor

2021-11-29 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. This LGTM by the way (not sure if that was already clear, since you abandoned a different review than I anticipated when squashing, and I'd "accepted" the other one); also see my suggestion to move the call to getFileInfo inside of markIncluded (might be error prone

[PATCH] D114326: Update the list of CUDA versions up to 11.5

2021-11-29 Thread Artem Belevich via Phabricator via cfe-commits
tra requested changes to this revision. tra added a comment. This revision now requires changes to proceed. With D114601 , this patch would no longer be needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2021-11-29 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:137 } else if (HostTriple.isOSWindows()) { -for (const char *Ver : Versions) - Candidates.emplace_back( mojca wrote: > tra wrote: > > Do we want to keep this as the fall-back

[PATCH] D114728: [Coroutine] Remove the prologue data of `-fsanitize=function` for split functions

2021-11-29 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D114728#3159303 , @rjmccall wrote: > I agree that coroutine resumption functions have a different formal type from > the ramp function and so would need different treatment from > `-fsanitize=functions` if it wants to sanitize

[PATCH] D114326: Update the list of CUDA versions up to 11.5

2021-11-29 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D114326#3159122 , @mojca wrote: > @tra: this is not yet 100% ready since the unit tests are now failing > (expecting to find CUDA 8.0). > I can fix the unit test, but I suppose that someone needs to install > additional SDK

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2021-11-29 Thread Devin Jeanpierre via Phabricator via cfe-commits
devin.jeanpierre added a comment. Wow, thanks for the quick response! I really appreciate it. In D114732#3159247 , @Quuxplusone wrote: > - (Major point of contention) To me, `[[trivial_abi]]` does not imply > `[[trivially_relocatable]]` at all. I

[PATCH] D114718: [analyzer] Implement a new checker for Strict Aliasing Rule.

2021-11-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StrictAliasingChecker.cpp:58 + : From(From), To(To), Ctx(Ctx) {} + bool canAccessImpl() { +return isSame() || isCharOrByte() || isOppositeSign(); I'd love to see some

[PATCH] D114718: [analyzer] Implement a new checker for Strict Aliasing Rule.

2021-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Awesome, I love it! What would it take to enable this by default? Note that we can enable the checker without emitting any warnings; sinking exotic execution paths (on which strict aliasing is known to be violated) is valuable on its own. Other than that, we'll probably

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

2021-11-29 Thread Vaibhav Yenamandra via Phabricator via cfe-commits
vaibhav.y updated this revision to Diff 390448. vaibhav.y added a comment. Rename enum members Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109701/new/ https://reviews.llvm.org/D109701 Files: clang/include/clang/Basic/Sarif.h

[PATCH] D114728: [Coroutine] Remove the prologue data of `-fsanitize=function` for split functions

2021-11-29 Thread John McCall via Phabricator via cfe-commits
rjmccall requested changes to this revision. rjmccall added a comment. This revision now requires changes to proceed. I agree that coroutine resumption functions have a different formal type from the ramp function and so would need different treatment from `-fsanitize=functions` if it wants to

[clang] 25eb7fa - Revert "OpenMP: Start calling setTargetAttributes for generated kernels"

2021-11-29 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2021-11-29T15:47:10-05:00 New Revision: 25eb7fa01d7ebbe67648ea03841cda55b4239ab2 URL: https://github.com/llvm/llvm-project/commit/25eb7fa01d7ebbe67648ea03841cda55b4239ab2 DIFF:

[PATCH] D114725: [clang-format] add back tests which didn't cause a regression

2021-11-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 390445. MyDeveloperDay added a comment. Remove unrelated file CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114725/new/ https://reviews.llvm.org/D114725 Files: clang/unittests/Format/FormatTest.cpp Index:

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. LGTM! Comment at: clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp:318 // FIXME: This should be a static_cast. // C HECK-FIXES: auto s5 = static_cast(cr); auto s6 = (S)cr; salman-javed-nz wrote: >

[PATCH] D114725: [clang-format] add back tests which didn't cause a regression

2021-11-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 390443. MyDeveloperDay marked 3 inline comments as done. MyDeveloperDay added a comment. Herald added subscribers: sdasgup3, wenzhicui, wrengr, Chia-hungDuan, dcaballe, cota, mravishankar, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh,

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz added a comment. Nothing else that comes to mind that I want to see. @Quuxplusone are you OK with the latest round of diffs? Comment at: clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp:318 // FIXME: This should be a static_cast.

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2021-11-29 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. On the one hand, I like that someone else is pushing a patch that's basically the same as D50119 , because maybe if enough people reimplement the same thing, eventually Clang will accept one of them. ;) However, I'd like to point

[PATCH] D114149: [clang-tidy] Fix pr48613: "llvm-header-guard uses a reserved identifier"

2021-11-29 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 D114149#3144614 , @salman-javed-nz wrote: > I reverted my changes to do with the invalid character substitution. Doing > something

[PATCH] D114651: [clang-cl] Expose -Wall to clang-cl by unaliasing -Wall, keeping /Wall as alias to -Weverything

2021-11-29 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D114651#3158807 , @rnk wrote: > I will add that multiple users have run into this problem, and I think it > might be more practical to consider unaliasing Wall altogether. Clang doesn't > emit the same set of warnings as

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz added inline comments. Comment at: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp:63-73 +static clang::CharSourceRange getReplaceRange(const ExplicitCastExpr *Expr) { + if (const auto *CastExpr = dyn_cast(Expr)) { +return

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2021-11-29 Thread Devin Jeanpierre via Phabricator via cfe-commits
devinj.jeanpierre added a comment. Just a heads up, I think this is my first change to clang or llvm, and I'd appreciate any feedback you have on the code, review process, etc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114732/new/

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2021-11-29 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. In D114413#3154936 , @peixin wrote: > @Meinersbur Please rebase on main. The function "getPreheader()" was moved > into OMPIRBuilder.h. I rebased, but I am not sure what you are referring to. `getPreheader()` always was in

[PATCH] D113518: [clang][Sema] Create delegating constructors even in templates

2021-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:4524-4525 if (!Dependent) { -if (Context.hasSameUnqualifiedType(QualType(ClassDecl->getTypeForDecl(),0), - BaseType)) +if (Delegating) return

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2021-11-29 Thread Devin Jeanpierre via Phabricator via cfe-commits
devinj.jeanpierre created this revision. devinj.jeanpierre added reviewers: rsmith, aaron.ballman, rjmccall, ahatanak. Herald added a subscriber: dexonsmith. devinj.jeanpierre requested review of this revision. Herald added a project: clang. This change enables library code to skip paired

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

2021-11-29 Thread Mojca Miklavec via Phabricator via cfe-commits
mojca added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:137 } else if (HostTriple.isOSWindows()) { -for (const char *Ver : Versions) - Candidates.emplace_back( tra wrote: > Do we want to keep this as the fall-back for cases when

[PATCH] D40319: [libcxx] Support getentropy as a source of randomness for std::random_device

2021-11-29 Thread Florian Weimer via Phabricator via cfe-commits
fweimer added a comment. `getentropy` comes from OpenBSD (among others), and it's in `` there: https://man.openbsd.org/getentropy.2 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D40319/new/ https://reviews.llvm.org/D40319

[PATCH] D40319: [libcxx] Support getentropy as a source of randomness for std::random_device

2021-11-29 Thread Jonathan Wakely via Phabricator via cfe-commits
jwakely added subscribers: fweimer, dalias. jwakely added inline comments. Comment at: libcxx/trunk/src/random.cpp:29 +#if defined(_LIBCPP_USING_GETENTROPY) +#include +#elif defined(_LIBCPP_USING_DEV_RANDOM) mcgrathr wrote: > jwakely wrote: > > jwakely wrote: >

[PATCH] D114326: Update the list of CUDA versions up to 11.5

2021-11-29 Thread Mojca Miklavec via Phabricator via cfe-commits
mojca added a comment. @tra: this is not yet 100% ready since the unit tests are now failing (expecting to find CUDA 8.0). I can fix the unit test, but I suppose that someone needs to install additional SDK somewhere into the infrastructure as well? In D114326#3158913

[PATCH] D113943: Add `withTag` matcher.

2021-11-29 Thread James King via Phabricator via cfe-commits
jcking1034 updated this revision to Diff 390429. jcking1034 added a comment. Chang `withTag` to `withIntrospection` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113943/new/ https://reviews.llvm.org/D113943 Files:

[PATCH] D114231: [clang][docs][dataflow] Added an introduction to dataflow analysis

2021-11-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. Thanks! Comment at: clang/docs/DataFlowAnalysisIntro.md:111-112 +information that we track. In this case, we can, for example, arbitrarily limit +the size of sets to 3

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

2021-11-29 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:137 } else if (HostTriple.isOSWindows()) { -for (const char *Ver : Versions) - Candidates.emplace_back( Do we want to keep this as the fall-back for cases when `CUDA_PATH` is

[PATCH] D114728: [Coroutine] Remove the prologue data of `-fsanitize=function` for split functions

2021-11-29 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: pcc, rjmccall. Herald added subscribers: ChuanqiXu, lxfind, hiraditya. ychen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. There are no proper RTTI for these split

[PATCH] D40319: [libcxx] Support getentropy as a source of randomness for std::random_device

2021-11-29 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: libcxx/trunk/src/random.cpp:29 +#if defined(_LIBCPP_USING_GETENTROPY) +#include +#elif defined(_LIBCPP_USING_DEV_RANDOM) jwakely wrote: > jwakely wrote: > > musl only declares `getentropy` in `` not ``. Glibc > >

[PATCH] D114639: Raise the minimum Visual Studio version to VS2019

2021-11-29 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/docs/UsersManual.rst:3546 -cmake -G"Visual Studio 15 2017" -T LLVM .. +cmake -G"Visual Studio 17 2022" -T LLVM .. Meinersbur wrote: > jhenderson wrote: > > RKSimon wrote: > > > aaron.ballman wrote: >

[PATCH] D114615: [NFC][clang]Increase the number of driver diagnostics

2021-11-29 Thread Steven Wan 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 rG3c32c568844c: [NFC][clang]Increase the number of driver diagnostics (authored by stevewan). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] 3c32c56 - [NFC][clang]Increase the number of driver diagnostics

2021-11-29 Thread Steven Wan via cfe-commits
Author: Steven Wan Date: 2021-11-29T14:12:03-05:00 New Revision: 3c32c568844c745e3fe7fa72ce3aa65340e545bc URL: https://github.com/llvm/llvm-project/commit/3c32c568844c745e3fe7fa72ce3aa65340e545bc DIFF: https://github.com/llvm/llvm-project/commit/3c32c568844c745e3fe7fa72ce3aa65340e545bc.diff

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-29 Thread Anshil Gandhi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdf0560ca0018: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in… (authored by gandhi21299). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] df0560c - [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-29 Thread Anshil Gandhi via cfe-commits
Author: Anshil Gandhi Date: 2021-11-29T12:07:13-07:00 New Revision: df0560ca00182364e0a786d35adb294c3c98dbd0 URL: https://github.com/llvm/llvm-project/commit/df0560ca00182364e0a786d35adb294c3c98dbd0 DIFF: https://github.com/llvm/llvm-project/commit/df0560ca00182364e0a786d35adb294c3c98dbd0.diff

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-29 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Thanks for the review, I will merge this patch in. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114553/new/ https://reviews.llvm.org/D114553 ___ cfe-commits mailing list

[PATCH] D114725: [clang-format] add back tests which didn't cause a regression

2021-11-29 Thread C. Rayroud via Phabricator via cfe-commits
crayroud added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:14125 verifyFormat("typedef void (*cb) (int);", Space); // FIXME these tests regressed behaviour. + verifyFormat("T A::operator() ();", Space); Remove the comment too.

[PATCH] D114162: [X86][clang] Enable floating-point type for -mno-x87 option on 32-bits

2021-11-29 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. Thanks for the patch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114162/new/ https://reviews.llvm.org/D114162 ___ cfe-commits

[PATCH] D114706: [analyzer] Fix sensitive argument logic in GenericTaintChecker

2021-11-29 Thread Balázs Benics via Phabricator via cfe-commits
steakhal requested changes to this revision. steakhal added a comment. This revision now requires changes to proceed. E.g. `execl()` and `execlp` functions are actually variadic. You should also account for them. I would rather map directly to a full-fledged Propagation rule instead of to a

[clang] 6c27d38 - OpenMP: Start calling setTargetAttributes for generated kernels

2021-11-29 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2021-11-29T13:43:34-05:00 New Revision: 6c27d389c8a00040aad998fe959f38ba709a8750 URL: https://github.com/llvm/llvm-project/commit/6c27d389c8a00040aad998fe959f38ba709a8750 DIFF:

[PATCH] D114143: [OpenMP][IRBuilder] Fix createSections

2021-11-29 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur accepted this revision. Meinersbur added a comment. This revision is now accepted and ready to land. AllocaIP could be handled better, but as a fix LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114143/new/

[PATCH] D114326: Update the list of CUDA versions up to 11.5

2021-11-29 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D114326#3154228 , @mojca wrote: > Somewhat off-topic from a discussion earlier in the thread. > What's the purpose of the following code then if users are supposed to > explicitly specify the `-L` flag anyway? Good point, it is

[PATCH] D114721: [clang][dataflow] Add unit tests for PostOrderCFGView

2021-11-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I don't have strong opinions, just some small preferences, feel free to ignore them: - Using ASTMatchers feels a bit heavy weight for this task to me. Simply enumerating the function definitions in the `TranslationUnitDecl` should be sufficient for these tests. -

[PATCH] D114484: [NFC][AIX]Disable unsupported hip test on AIX

2021-11-29 Thread Steven Wan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG23dc88622630: [NFC][AIX]Disable unsupported hip test on AIX (authored by stevewan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114484/new/

[clang] 23dc886 - [NFC][AIX]Disable unsupported hip test on AIX

2021-11-29 Thread Steven Wan via cfe-commits
Author: Steven Wan Date: 2021-11-29T13:26:26-05:00 New Revision: 23dc886226306d961c31987db9aad137a69ad539 URL: https://github.com/llvm/llvm-project/commit/23dc886226306d961c31987db9aad137a69ad539 DIFF: https://github.com/llvm/llvm-project/commit/23dc886226306d961c31987db9aad137a69ad539.diff

[PATCH] D114725: [clang-format] add back tests which didn't cause a regression

2021-11-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 390407. MyDeveloperDay added a comment. bring back another 2 verifyFormats CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114725/new/ https://reviews.llvm.org/D114725 Files: clang/unittests/Format/FormatTest.cpp Index:

[PATCH] D114725: [clang-format] add back tests which didn't cause a regression

2021-11-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added a reviewer: crayroud. MyDeveloperDay added projects: clang, clang-format. MyDeveloperDay requested review of this revision. bring back the valid tests removed as part of D114696: [clang-format] regressed default behavior for operator

[PATCH] D114724: [clangd][StdSymbolMap] Prefer std::remove from algorithm

2021-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: usaxena95, arphaman. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. std::remove from algorithm is

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114553/new/ https://reviews.llvm.org/D114553

[PATCH] D114723: [clangd] Make std symbol generation script python3 friendly

2021-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: hokein. Herald added subscribers: usaxena95, arphaman. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository: rG LLVM Github

[PATCH] D114721: [clang][dataflow] Add unit tests for PostOrderCFGView

2021-11-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Looks good, but why split the test into its own directory? I see that the implementation file is in clang/lib/Analysis and, in general, the lib and unittest directories are often flatter than the corresponding include directories. Maybe just put it directly into

[PATCH] D114639: Raise the minimum Visual Studio version to VS2019

2021-11-29 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added inline comments. Comment at: clang/docs/UsersManual.rst:3546 -cmake -G"Visual Studio 15 2017" -T LLVM .. +cmake -G"Visual Studio 17 2022" -T LLVM .. jhenderson wrote: > RKSimon wrote: > > aaron.ballman wrote: > > > jhenderson wrote:

[PATCH] D114651: [clang-cl] Expose -Wall to clang-cl by unaliasing -Wall, keeping /Wall as alias to -Weverything

2021-11-29 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I will add that multiple users have run into this problem, and I think it might be more practical to consider unaliasing Wall altogether. Clang doesn't emit the same set of warnings as MSVC. Anyone seriously using `clang-cl /Wall` is going to receive a pile of

[PATCH] D114622: [clang-tidy][analyzer] Fix false-positive in IdenticalExprChecker and misc-redundant-expression

2021-11-29 Thread David Rector via Phabricator via cfe-commits
davrec added a comment. A couple thoughts/cases to consider... Comment at: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp:52 static bool areEquivalentNameSpecifier(const NestedNameSpecifier *Left, const

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

2021-11-29 Thread Vaibhav Yenamandra via Phabricator via cfe-commits
vaibhav.y added inline comments. Comment at: clang/include/clang/Basic/Sarif.h:80-82 + static SarifArtifactLocation create(StringRef URI) { +return SarifArtifactLocation{URI}; + } aaron.ballman wrote: > One thing that's worth calling out is that

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

2021-11-29 Thread Vaibhav Yenamandra via Phabricator via cfe-commits
vaibhav.y updated this revision to Diff 390396. vaibhav.y marked 6 inline comments as done. vaibhav.y added a comment. Rebase on upstream/main: - [clangBasic] Format code - [clangBasic] Mark all constructors taking single values `explicit` - [clangBasic] Convert `StringRef` to `std::string`

[PATCH] D114721: [clang][dataflow] Add unit tests for PostOrderCFGView

2021-11-29 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev created this revision. sgatev added reviewers: ymandel, xazax.hun, gribozavr2. Herald added subscribers: rnkovacs, mgorny. sgatev requested review of this revision. Herald added a project: clang. This adds unit tests for the PostOrderCFGView class which will be used as part of the

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 390394. carlosgalvezp added a comment. Move logic into single functions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427 Files: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp

[PATCH] D114718: [analyzer] Implement a new checker for Strict Aliasing Rule.

2021-11-29 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @rsmith, @aaron.ballman I kindly invite you to join the review process especially in a part of the Standard interpretation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114718/new/ https://reviews.llvm.org/D114718

[PATCH] D114718: [analyzer] Implement a new checker for Strict Aliasing Rule.

2021-11-29 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: rsmith, martong, NoQ, vsavchenko, steakhal, aaron.ballman, xazax.hun, Szelethus. ASDenysPetrov added a project: clang. Herald added subscribers: manas, jeroen.dobbelaere, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs,

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp:63-79 +static clang::CharSourceRange getReplaceRange(const CStyleCastExpr *CastExpr) { + return CharSourceRange::getCharRange( + CastExpr->getLParenLoc(),

[PATCH] D114639: Raise the minimum Visual Studio version to VS2019

2021-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D114639#3158401 , @RKSimon wrote: >> Have you checked whether there are any bots in the lab that will need to be >> updated? > > I did find a number of bots that I think need addressing, I am intending to > privately

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp:101-110 +static StringRef getDestTypeString(const SourceManager , + const LangOptions , + const

[PATCH] D114619: [Analyzer][solver] Do not remove the simplified symbol from the eq class

2021-11-29 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. I think it looks great. Comment at: clang/test/Analysis/symbol-simplification-disequality-info.cpp:15-26 + // CHECK: "disequality_info": [ + // CHECK-NEXT: { +

  1   2   >