[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-20 Thread Brooks Moses via Phabricator via cfe-commits
brooksmoses added a comment. So, I have bad news: This causes OpenJDK to segfault. The relevant code is here: https://github.com/openjdk/jdk/blob/master/src/hotspot/share/memory/arena.cpp#L311 void Arena::destruct_contents() { if (UseMallocOnly && _first != NULL) { char* end =

[clang] e91b234 - [mac/arm] Fix test/Driver/darwin-sdk-version.c on arm macs

2020-11-20 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2020-11-20T22:32:31-05:00 New Revision: e91b2344ad7294c47d8b10b3a84e962bc3ed4160 URL: https://github.com/llvm/llvm-project/commit/e91b2344ad7294c47d8b10b3a84e962bc3ed4160 DIFF: https://github.com/llvm/llvm-project/commit/e91b2344ad7294c47d8b10b3a84e962bc3ed4160.diff

[clang] c473184 - [mac/arm] Fix clang/test/Sema/wchar.c on mac/arm hosts

2020-11-20 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2020-11-20T21:49:17-05:00 New Revision: c47318491439642ed47cb9c9098333a8199fa54a URL: https://github.com/llvm/llvm-project/commit/c47318491439642ed47cb9c9098333a8199fa54a DIFF: https://github.com/llvm/llvm-project/commit/c47318491439642ed47cb9c9098333a8199fa54a.diff

[PATCH] D91904: [mac/arm] Fix rtti codegen tests when running on an arm mac

2020-11-20 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: rjmccall. Herald added subscribers: kristof.beyls, dschuff. thakis requested review of this revision. Herald added a subscriber: aheejin. [mac/arm] Fix rtti codegen tests when running on an arm mac shouldRTTIBeUnique() returns false for

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-20 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 306815. smhc added a comment. Updated after review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90282/new/ https://reviews.llvm.org/D90282 Files: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp

[PATCH] D91895: [Clang] avoid -Wimplicit-fallthrough for fallthrough to break

2020-11-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. And for `drivers/hid/usbhid/hid-core.c` it looks like multiple labels are modeled as individual blocks in the control flow graph. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91895/new/

[PATCH] D91859: [clangd] Fix shared-lib builds

2020-11-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D91859#2408064 , @sammccall wrote: > I'm not totally following the discussion on the more complete fix (LMK if you > want me to dig into that), but if the build is broken in some configurations > we should likely prioritize

[PATCH] D91868: [clangd] Mention when CXXThis is implicit in exposed AST.

2020-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/DumpAST.cpp:233 return CCO->getConstructor()->getNameAsString(); +if (const auto *CTE = dyn_cast(S)) { + bool Const = CTE->getType()->getPointeeType().isLocalConstQualified();

[PATCH] D91895: [Clang] avoid -Wimplicit-fallthrough for fallthrough to break

2020-11-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Testing this on the kernel with `-Wimplicit-fallthrough`, there's some additional cases that are still warning: // mm/vmscan.c 1371 mapping = page_mapping(page);

[PATCH] D91029: [clangd] Implement clang-tidy options from config

2020-11-20 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clangd/TidyProvider.h:20 +/// The base class of all clang-tidy config providers for clangd. +class TidyProvider { +public: sammccall wrote: > we're using

[PATCH] D91029: [clangd] Implement clang-tidy options from config

2020-11-20 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 306796. njames93 marked 7 inline comments as done. njames93 added a comment. Messed up branches, fixed that Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91029/new/ https://reviews.llvm.org/D91029 Files:

[PATCH] D89743: Support Attr in DynTypedNode and ASTMatchers.

2020-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 306795. sammccall added a comment. Herald added subscribers: arphaman, kbarton, nemanjai. Drop hasAttrName matcher. Update uses of hasAncestor(isImplicit()) to hasAncestor(decl(isImplicit())), as the former no longer compiles due to lack of deduction.

[PATCH] D91029: [clangd] Implement clang-tidy options from config

2020-11-20 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 306794. njames93 marked an inline comment as done. njames93 added a comment. Reworked everything. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91029/new/ https://reviews.llvm.org/D91029 Files:

[PATCH] D91898: [attributes] Add a facility for defining and enforcing a Trusted Computing Base.

2020-11-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: aaron.ballman, dexonsmith, erik.pilkington, vsavchenko. Herald added subscribers: martong, Charusso, JDevlieghere, kristof.beyls. NoQ requested review of this revision. Patch by Sean Dooher! I'll be addressing the review comments. The point is to

[PATCH] D89743: Support Attr in DynTypedNode and ASTMatchers.

2020-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D89743#2409001 , @sammccall wrote: > We didn't talk about overloading isImplicit to apply to attrs too, but it > doesn't seem like that was controversial (and it does help with the tests). I spoke too soon about this...

[PATCH] D83211: Factor out call to EXTRACTOR in generateCC1CommandLine

2020-11-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added a comment. This revision now requires changes to proceed. Marking as "requested changes" to get this off my queue, but if my lambda suggestion doesn't work well for some reason (maybe it significantly increases compile-time), I'm

[PATCH] D83694: [clang][cli] Port DependencyOutput option flags to new option parsing system

2020-11-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:156-159 +template +FlagToValueNormalizer makeFlagToValueNormalizer(T Value) { + return FlagToValueNormalizer{std::move(Value)}; } dexonsmith wrote: > Please declare this

[PATCH] D87974: [Builtin] Add __builtin_zero_non_value_bits.

2020-11-20 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver added a comment. > How should I check for support? Is it going to be e.g. > __has_feature(__builtin_clear_padding)? I'm not sure `__has_feature` will work but `__has_builtin` should work on both Clang and GCC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D91828: [Sema/Attribute] Ignore noderef attribute in unevaluated context

2020-11-20 Thread Jann Horn via Phabricator via cfe-commits
thejh added inline comments. Comment at: clang/test/Frontend/noderef.c:71 + x = sizeof(s->a + (s->b)); // ok + // Nested struct access aaron.ballman wrote: > Can you add tests for the weird situations where the expression actually is > evaluated? e.g., >

[PATCH] D91828: [Sema/Attribute] Ignore noderef attribute in unevaluated context

2020-11-20 Thread Jann Horn via Phabricator via cfe-commits
thejh updated this revision to Diff 306792. thejh marked an inline comment as done. thejh added a comment. As requested by @aaron.ballman, added tests for edgecases where sizeof()/typeid() can cause memory access. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D91669: Don’t break before nested block param when prior param is not a block

2020-11-20 Thread Keith Smiley 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 rG244022a3cd75: Don’t break before nested block param when prior param is not a block (authored by segiddins, committed by keith). Repository: rG

[clang] 244022a - Don’t break before nested block param when prior param is not a block

2020-11-20 Thread Keith Smiley via cfe-commits
Author: Samuel Giddins Date: 2020-11-20T15:16:04-08:00 New Revision: 244022a3cd75b51dcf1d2a5a822419492ce79e47 URL: https://github.com/llvm/llvm-project/commit/244022a3cd75b51dcf1d2a5a822419492ce79e47 DIFF:

[PATCH] D91895: [Clang] avoid -Wimplicit-fallthrough for fallthrough to break

2020-11-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 306787. nickdesaulniers added a comment. - check the successor's terminator Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91895/new/ https://reviews.llvm.org/D91895 Files:

[PATCH] D91895: [Clang] avoid -Wimplicit-fallthrough for fallthrough to break

2020-11-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:1156 + const CFGBlock::AdjacentBlock = *P->succ_begin(); + const Stmt *Term = B.getTerminatorStmt(); + if (Succ->size() == 0 && Term && isa(Term))

[PATCH] D91895: [Clang] avoid -Wimplicit-fallthrough for fallthrough to break

2020-11-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: rsmith, aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. nickdesaulniers requested review of this revision. Clang differs slightly than GCC for the pattern: switch (x) { case 0:

[PATCH] D87974: [Builtin] Add __builtin_zero_non_value_bits.

2020-11-20 Thread Olivier Giroux via Phabricator via cfe-commits
__simt__ added a comment. I've resumed looking at the library code. How should I check for support? Is it going to be e.g. `__has_feature(__builtin_clear_padding)`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87974/new/

[PATCH] D91821: Fix PR42049 - Crash when parsing bad decltype use within template argument list after name assumed to be a function template

2020-11-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:1055 + // semi-colon. + EndLoc = PP.getLastCachedTokenLocation(); +} It seems to me that either `EndLoc` was miscomputed and should already point to the last token that we

[PATCH] D91868: [clangd] Mention when CXXThis is implicit in exposed AST.

2020-11-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. This looks like an improvement to me as well, thanks! Comment at: clang-tools-extra/clangd/DumpAST.cpp:233 return CCO->getConstructor()->getNameAsString(); +if (const auto *CTE = dyn_cast(S)) { + bool Const =

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-20 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: clang/test/CXX/cpp/cpp.predefined/p2.cpp:1 +// RUN: %clang_cc1 %s -verify +// expected-no-diagnostics rnk wrote: > Let's expand on this: > - test that we don't set the macro

[PATCH] D89743: Support Attr in DynTypedNode and ASTMatchers.

2020-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. OK, I'm going to drop hasAttrName from the patch (it's a relatively tiny piece of the code/tests) and land this, and put that back up as another review for discussion. And thanks, it's been interesting and I learned a bunch! We didn't talk about overloading isImplicit

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-20 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 306777. zequanwu added a comment. Update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/ https://reviews.llvm.org/D91747 Files: clang/include/clang/Basic/CodeGenOptions.h

[PATCH] D87974: [Builtin] Add __builtin_zero_non_value_bits.

2020-11-20 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver added a comment. > Let's make sure that we follow the same semantics that GCC does, particularly > w.r.t. union, bitfields, and padding at the end of an object (whether it's in > an array or not). Agreed. I'm planning to run some tests tomorrow once the nightly build has updated.

[PATCH] D83697: [clang][cli] Port Frontend option flags to new option parsing system

2020-11-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added a comment. This revision now requires changes to proceed. This is close, just a few nits. Also, since this has the first uses of `IsNegative`, it'd be great to have a couple of tests for one of the flags it's used on.

[PATCH] D87974: [Builtin] Add __builtin_zero_non_value_bits.

2020-11-20 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Let's make sure that we follow the same semantics that GCC does, particularly w.r.t. union, bitfields, and padding at the end of an object (whether it's in an array or not). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D83694: [clang][cli] Port DependencyOutput option flags to new option parsing system

2020-11-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang/Driver/Options.td:473 +MarshallingInfoFlag<"DependencyOutputOpts.OutputFormat", "DependencyOutputFormat::Make">, +

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-11-20 Thread Felix Berger via Phabricator via cfe-commits
flx updated this revision to Diff 306773. flx added a comment. Fix formatting and comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91893/new/ https://reviews.llvm.org/D91893 Files:

[PATCH] D91893: [clang-tidy] performance-unnecessary-copy-initialization: Prevent false positives when dependent variable is modified.

2020-11-20 Thread Felix Berger via Phabricator via cfe-commits
flx created this revision. flx added reviewers: aaron.ballman, hokein. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. flx requested review of this revision. Extend the check to not only look at the variable the unnecessarily copied variable is initialized from,

[PATCH] D91844: [llvm][clang] Add checks for the smart pointers with the possibility to be null

2020-11-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Is it possible to split these up into separate patches for unrelated code? Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:1346-1353 if (!Ptr) { // Search in reverse order so that the most-derived type is handled first. ArrayRef>

[PATCH] D91565: Guard init_priority attribute within libc++

2020-11-20 Thread Abhina Sree via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2c7e24c4b689: Guard init_priority attribute within libc++

[clang] 2c7e24c - Guard init_priority attribute within libc++

2020-11-20 Thread Abhina Sreeskantharajan via cfe-commits
Author: Zbigniew Sarbinowski Date: 2020-11-20T15:53:26-05:00 New Revision: 2c7e24c4b6893a93ddb2b2cca91eaf5bf7956965 URL: https://github.com/llvm/llvm-project/commit/2c7e24c4b6893a93ddb2b2cca91eaf5bf7956965 DIFF:

[PATCH] D89684: [AIX] Add mabi=vec-extabi options to enable the AIX extended and default vector ABIs.

2020-11-20 Thread Xiangling Liao via Phabricator via cfe-commits
Xiangling_L added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1443 + if (Arg *A = + Args.getLastArg(OPT_mabi_EQ_vec_default, OPT_mabi_EQ_vec_extabi)) { ZarkoCA wrote: > Xiangling_L wrote: > > Should we also check if target

[PATCH] D91605: [sanitizers] Implement GetTls on Solaris

2020-11-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/tools/driver/CMakeLists.txt:123 + +check_linker_flag("-Wl,-z,relax=transtls" LINKER_SUPPORTS_Z_RELAX_TRANSTLS) ro wrote: > MaskRay wrote: > > ro wrote: > > > MaskRay wrote: > > > > GNU ld reports a warning instead

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-20 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/test/CXX/cpp/cpp.predefined/p2.cpp:1 +// RUN: %clang_cc1 %s -verify +// expected-no-diagnostics Let's expand on this: - test that we don't set the macro when compiling C (`-x c`) - test that we don't set the macro

[PATCH] D90507: [Driver] Add DWARF64 flag: -gdwarf64

2020-11-20 Thread Alexander Yermolovich via Phabricator via cfe-commits
ayermolo added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.def:35 CODEGENOPT(AsmVerbose, 1, 0) ///< -dA, -fverbose-asm. +CODEGENOPT(Dwarf64 , 1, 0) ///< -gdwarf64. CODEGENOPT(PreserveAsmComments, 1, 1) ///< -dA,

[PATCH] D89743: Support Attr in DynTypedNode and ASTMatchers.

2020-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D89743#2406017 , @sammccall wrote: > In D89743#2363201 , @aaron.ballman > wrote: > >> In D89743#2360258 , @sammccall >> wrote: >> >>>

[PATCH] D91861: [clang][cli] Split DefaultAnyOf into a default value and ImpliedByAnyOf

2020-11-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4038-4043 if (((FLAGS)::CC1Option) && \ - (ALWAYS_EMIT || EXTRACTOR(this->KEYPATH) != DEFAULT_VALUE)) { \ + (ALWAYS_EMIT ||

[PATCH] D91861: [clang][cli] Split DefaultAnyOf into a default value and ImpliedByAnyOf

2020-11-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. I like this direction; the logic in the `.td` files seems much cleaner. The `MARSHALLING` macro logic seems a bit harder to follow and there may be a bug, but I'm not sure. See comments inline. Comment at:

[clang-tools-extra] de5b0b7 - [clangd] semanticTokens: fields are 'property', not 'member'

2020-11-20 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-11-20T20:53:12+01:00 New Revision: de5b0b776fd7de72078256e003ede4fb5c37cdcb URL: https://github.com/llvm/llvm-project/commit/de5b0b776fd7de72078256e003ede4fb5c37cdcb DIFF: https://github.com/llvm/llvm-project/commit/de5b0b776fd7de72078256e003ede4fb5c37cdcb.diff

[PATCH] D86502: [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe instrumentation.

2020-11-20 Thread Wei Mi via Phabricator via cfe-commits
wmi accepted this revision. wmi added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:978-982 Opts.DebugInfoForProfiling = Args.hasFlag( OPT_fdebug_info_for_profiling,

[PATCH] D89046: [AST] Build recovery expression by default for all language.

2020-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/CodeGen/builtins-ppc-error.c:51 void testCTF(int index) { - vec_ctf(vsi, index); //expected-error {{argument to '__builtin_altivec_vcfsx'

[PATCH] D91565: Guard init_priority attribute within libc++

2020-11-20 Thread Zbigniew Sarbinowski via Phabricator via cfe-commits
zibi marked an inline comment as done. zibi added inline comments. Comment at: clang/test/SemaCXX/init-priority-attr.cpp:26 Two foo __attribute__((init_priority(101))) ( 5, 6 ); +#if defined(__MVS__) + #if defined(SYSTEM) aaron.ballman wrote: > Rather than

[PATCH] D91565: Guard init_priority attribute within libc++

2020-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, thank you for the fixes! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91565/new/ https://reviews.llvm.org/D91565 ___

[PATCH] D91565: Guard init_priority attribute within libc++

2020-11-20 Thread Zbigniew Sarbinowski via Phabricator via cfe-commits
zibi updated this revision to Diff 306753. zibi added a comment. Make test cleaner. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91565/new/ https://reviews.llvm.org/D91565 Files: clang/include/clang/Basic/Attr.td

[PATCH] D91805: [OPENMP]Use the real pointer value as base, not indexed value.

2020-11-20 Thread Alexey Bataev 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 rGc964f3081415: [OPENMP]Use the real pointer value as base, not indexed value. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES

[clang] c964f30 - [OPENMP]Use the real pointer value as base, not indexed value.

2020-11-20 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-11-20T11:34:14-08:00 New Revision: c964f308141578f24932c68a03af5fae7f876011 URL: https://github.com/llvm/llvm-project/commit/c964f308141578f24932c68a03af5fae7f876011 DIFF: https://github.com/llvm/llvm-project/commit/c964f308141578f24932c68a03af5fae7f876011.diff

[PATCH] D91565: Guard init_priority attribute within libc++

2020-11-20 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision as: libc++. ldionne added a comment. LGTM from libc++'s perspective. You should wait until the Clang part is LGTM'd before committing, of course. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91565/new/

[PATCH] D91885: [clang-tidy] Add support for diagnostics with no location

2020-11-20 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman. Herald added subscribers: cfe-commits, kbarton, xazax.hun, nemanjai. Herald added a project: clang. njames93 requested review of this revision. Add methods for emitting diagnostics with no location as well as a

[PATCH] D91644: [OPENMP]Honor constantness of captured variables.

2020-11-20 Thread Alexey Bataev 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 rG8f51dc49673c: [OPENMP]Honor constantness of captured variables. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] 8f51dc4 - [OPENMP]Honor constantness of captured variables.

2020-11-20 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-11-20T11:11:47-08:00 New Revision: 8f51dc49673c494cc1d118979b596288e938af13 URL: https://github.com/llvm/llvm-project/commit/8f51dc49673c494cc1d118979b596288e938af13 DIFF: https://github.com/llvm/llvm-project/commit/8f51dc49673c494cc1d118979b596288e938af13.diff

[PATCH] D86502: [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe instrumentation.

2020-11-20 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:978-982 Opts.DebugInfoForProfiling = Args.hasFlag( OPT_fdebug_info_for_profiling, OPT_fno_debug_info_for_profiling, false); + Opts.PseudoProbeForProfiling = +

[PATCH] D86502: [CSSPGO] A Clang switch -fpseudo-probe-for-profiling for pseudo-probe instrumentation.

2020-11-20 Thread Wei Mi via Phabricator via cfe-commits
wmi added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:978-982 Opts.DebugInfoForProfiling = Args.hasFlag( OPT_fdebug_info_for_profiling, OPT_fno_debug_info_for_profiling, false); + Opts.PseudoProbeForProfiling = +

[PATCH] D87974: [Builtin] Add __builtin_zero_non_value_bits.

2020-11-20 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver added a comment. In D87974#2408119 , @jwakely wrote: > As of a few hours ago, GCC has `__builtin_clear_padding`, see > https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fclear_005fpadding > for the docs. Great.

[PATCH] D91327: [NewPM] Redesign of PreserveCFG Checker

2020-11-20 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar added a comment. Looks fine to me, but I'm not confident enough to give an approval. Comment at: llvm/lib/Passes/StandardInstrumentations.cpp:733-735 + static AnalysisKey Key; + +public: This is already public CHANGES SINCE LAST ACTION

[PATCH] D91565: Guard init_priority attribute within libc++

2020-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/init-priority-attr.cpp:26 Two foo __attribute__((init_priority(101))) ( 5, 6 ); +#if defined(__MVS__) + #if defined(SYSTEM) Rather than using the preprocessor, you can assign a prefix to be

[PATCH] D91872: [libTooling] Update Transformer's `node` combinator to include the trailing semicolon for decls.

2020-11-20 Thread Yitzhak Mandelbaum 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 rG88e62085624e: [libTooling] Update Transformers `node` combinator to include the trailing… (authored by ymandel). Changed prior to commit:

[clang] 88e6208 - [libTooling] Update Transformer's `node` combinator to include the trailing semicolon for decls.

2020-11-20 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2020-11-20T18:11:50Z New Revision: 88e62085624e7ec55bd4a41c6d77acdcb7f1d113 URL: https://github.com/llvm/llvm-project/commit/88e62085624e7ec55bd4a41c6d77acdcb7f1d113 DIFF: https://github.com/llvm/llvm-project/commit/88e62085624e7ec55bd4a41c6d77acdcb7f1d113.diff

[PATCH] D91747: [Clang] Add __STDCPP_THREADS__ to standard predefine macros

2020-11-20 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 306724. zequanwu added a comment. Herald added a subscriber: dexonsmith. Add ThreadModel to LangOptions and remove it from CodegenOption. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91747/new/

[PATCH] D91373: [OpenMP5.0] Support more kinds of lvalues in map clauses

2020-11-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D91373#2408175 , @jacobdweightman wrote: > Ping 1. Provide full diff, see https://www.llvm.org/docs/Phabricator.html for the guidance. 2. Need some more test with ast printing and codegen. 3. Would be good if you could run

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:127-128 getFileStyleFromOptions(const ClangTidyCheck::OptionsView ) { SmallVector, 0> Styles( SK_Count); SmallString<64> StyleString;

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added inline comments. Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:589 sort(FrameData.Allocas, [&](const auto , const auto ) { -return GetAllocaSize(Iter1) > GetAllocaSize(Iter2); +return

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 306715. fpetrogalli edited the summary of this revision. fpetrogalli added a comment. I have added assertions around before `TypeSize` comparisons where it made sense to do so, but not in the lambda used in the `sort` invocation. Repository: rG LLVM

[PATCH] D91567: [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

2020-11-20 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. From a ThinLTO perspective, no specific concerns as the buildModuleSimplificationPipeline is invoked in both the pre and post LTO link pipelines, so they both get an equivalent change. But there is an issue for regular LTO, noted below. Comment

[PATCH] D91828: [Sema/Attribute] Ignore noderef attribute in unevaluated context

2020-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Frontend/noderef.c:71 + x = sizeof(s->a + (s->b)); // ok + // Nested struct access Can you add tests for the weird situations where the expression actually is evaluated? e.g., ``` struct S {

[PATCH] D91872: [libTooling] Update Transformer's `node` combinator to include the trailing semicolon for decls.

2020-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D91872#2408321 , @ymandel wrote: > In D91872#2408278 , @aaron.ballman > wrote: > >> Drive-by question from the peanut gallery, sorry if this is an ignorant one >> -- not all

[PATCH] D91872: [libTooling] Update Transformer's `node` combinator to include the trailing semicolon for decls.

2020-11-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D91872#2408278 , @aaron.ballman wrote: > Drive-by question from the peanut gallery, sorry if this is an ignorant one > -- not all declarations have a trailing semicolon; is that handled properly? > e.g., `int x;` has a

[PATCH] D91872: [libTooling] Update Transformer's `node` combinator to include the trailing semicolon for decls.

2020-11-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 306707. ymandel added a comment. Clarified that semicolons are only removed if present. Fixed test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91872/new/ https://reviews.llvm.org/D91872 Files:

[PATCH] D91874: [GNU ObjC] Fix a regression listing methods twice.

2020-11-20 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. This was caught with the GNUstep runtime's test suite, which apparently had not been run with anything newer than clang 8 until recently. With this patch, all of the runtime's tests now pass again (a few others failed in 10 but appear to have been fixed in 11 or 12).

[PATCH] D91874: [GNU ObjC] Fix a regression listing methods twice.

2020-11-20 Thread David Chisnall via Phabricator via cfe-commits
theraven created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. theraven requested review of this revision. Methods synthesized from declared properties were being added to the method lists twice. This came from the change to list them in the class's method

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added a comment. Thank you for the review @sdesmalen 1. I have replied to the comment about `auto` with my reason for removing it. 2. I removed the C test, as the LL file is enough. 3. The third comment requires more investigation, I'll

[PATCH] D91872: [libTooling] Update Transformer's `node` combinator to include the trailing semicolon for decls.

2020-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Drive-by question from the peanut gallery, sorry if this is an ignorant one -- not all declarations have a trailing semicolon; is that handled properly? e.g., `int x;` has a trailing semicolon but `int x, y;` only has a trailing semicolon for one of the two

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

2020-11-20 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, thank you for the new check! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89651/new/ https://reviews.llvm.org/D89651

[PATCH] D91872: [libTooling] Update Transformer's `node` combinator to include the trailing semicolon for decls.

2020-11-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: tdl-g. Herald added a project: clang. ymandel requested review of this revision. Currently, `node` only includes the semicolon for (some) statements. However, declarations have the same issue of trailing semicolons, so `node` should behave

[PATCH] D90928: [OpenCL] Check for extension string extension lookup

2020-11-20 Thread Erik Tomusk via Phabricator via cfe-commits
erik2020 added a comment. In D90928#2405796 , @Anastasia wrote: > Do you think we could improve testing? I presume there is something that > triggers a failure without your change... I'm not really sure how to test this code. Best I can tell, there's no

[PATCH] D89684: [AIX] Add mabi=vec-extabi options to enable the AIX extended and default vector ABIs.

2020-11-20 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA updated this revision to Diff 306696. ZarkoCA marked an inline comment as done. ZarkoCA added a comment. Addressed comments and added a test to check whether the driver passes these options. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89684/new/

[PATCH] D89684: [AIX] Add mabi=vec-extabi options to enable the AIX extended and default vector ABIs.

2020-11-20 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA marked 5 inline comments as done. ZarkoCA added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1443 + if (Arg *A = + Args.getLastArg(OPT_mabi_EQ_vec_default, OPT_mabi_EQ_vec_extabi)) { Xiangling_L wrote: > Should we

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-11-20 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG51e09e1d5aa4: [AMDGPU] Set the default globals address space to 1 (authored by arichardson). Changed prior to commit: https://reviews.llvm.org/D84345?vs=289235=306693#toc Repository: rG LLVM Github

[clang] 51e09e1 - [AMDGPU] Set the default globals address space to 1

2020-11-20 Thread Alex Richardson via cfe-commits
Author: Alex Richardson Date: 2020-11-20T15:46:53Z New Revision: 51e09e1d5aa43296cf8baf26a74793fd86b0b0d2 URL: https://github.com/llvm/llvm-project/commit/51e09e1d5aa43296cf8baf26a74793fd86b0b0d2 DIFF: https://github.com/llvm/llvm-project/commit/51e09e1d5aa43296cf8baf26a74793fd86b0b0d2.diff

[PATCH] D91373: [OpenMP5.0] Support more kinds of lvalues in map clauses

2020-11-20 Thread Jacob Weightman via Phabricator via cfe-commits
jacobdweightman added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91373/new/ https://reviews.llvm.org/D91373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-20 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis added a comment. In D75229#2406758 , @jfb wrote: > Most of the tests as written should be failing right now, at least on macOS > and Linux, because they likely should be identified as POSIX, right? Yes, now it fails on my system too. What

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-11-20 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 306690. abelkocsis added a comment. Fix, `MacroName == "__unix__"` seems really necessary. Without that, it throws a warning for me on Linux. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/

[PATCH] D91035: [NFC, Refactor] Convert FunctionDefinitionKind from DeclSpech.h to a scoped enum

2020-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:1756 /// a function. -enum FunctionDefinitionKind { - FDK_Declaration, - FDK_Definition, - FDK_Defaulted, - FDK_Deleted +enum class FunctionDefinitionKind : unsigned char { + Declaration,

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-20 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 306687. smhc added a comment. removed notes on short length threshold CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90282/new/ https://reviews.llvm.org/D90282 Files: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-20 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 306686. smhc added a comment. Updated diff to use 'IgnoredRegexp' I see that a regexp has been used elsewhere for some other checks (macro usage, AllowedRegexp). (as a side note, I see that AllowedRegexp string is getting compiled on every match rather than

[PATCH] D91035: [NFC, Refactor] Convert FunctionDefinitionKind from DeclSpech.h to a scoped enum

2020-11-20 Thread Faisal Vali via Phabricator via cfe-commits
faisalv added a comment. *ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91035/new/ https://reviews.llvm.org/D91035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-20 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. This patch needs to be retitled to what this is actually doing: changing the getTypeAllocationSizeInBits and getFragmentSizeInBits to return a TypeSize instead of `unsigned`. It would be even better if you can split those up into two patches with separate tests for

[clang-tools-extra] e4f9b5d - [clang-tidy] Include std::basic_string_view in readability-redundant-string-init.

2020-11-20 Thread Chris Kennelly via cfe-commits
Author: Chris Kennelly Date: 2020-11-20T10:06:57-05:00 New Revision: e4f9b5d442a260dd78b3de581cec1e90567a2aac URL: https://github.com/llvm/llvm-project/commit/e4f9b5d442a260dd78b3de581cec1e90567a2aac DIFF:

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

2020-11-20 Thread Chris Kennelly 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 rGe4f9b5d442a2: [clang-tidy] Include std::basic_string_view in readability-redundant-string… (authored by ckennelly). Repository: rG LLVM Github

[PATCH] D87974: [Builtin] Add __builtin_zero_non_value_bits.

2020-11-20 Thread Jonathan Wakely via Phabricator via cfe-commits
jwakely added a comment. As of a few hours ago, GCC has [`__builtin_clear_padding`](https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fclear_005fpadding) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87974/new/

[PATCH] D91806: [SVE] Remove warnings from release notes example on SVE ACLE.

2020-11-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 306684. fpetrogalli added a comment. I have removed the C test, as the LL test is enough to test the changes I have done in `Local.cpp`. I can confirm that with this patch, the release note ton'r raise any warnings when compiling with debug info:

[PATCH] D88676: [PPC][AIX] Add vector callee saved registers for AIX extended vector ABI

2020-11-20 Thread Sean Fertile via Phabricator via cfe-commits
sfertile accepted this revision. sfertile added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88676/new/ https://reviews.llvm.org/D88676 ___ cfe-commits mailing list

  1   2   >