[PATCH] D86743: [analyzer] Ignore VLASizeChecker case that could cause crash

2020-09-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I agree here with @Szelethus. We should investigate first why the assumption fails. Then we can decide about the best possible fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86743/new/

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko accepted this revision. vsavchenko added a comment. This revision is now accepted and ready to land. Thanks! Great job! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87004/new/ https://reviews.llvm.org/D87004

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked an inline comment as done. steakhal added a comment. Thank you all for the comments! Comment at: clang/test/Analysis/eval-predefined-exprs.cpp:101 +// Such functions have no function name of predefined expressions such as: '__func__' etc. +

[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

2020-09-02 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. Ping! @MaskRay any further comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70378/new/ https://reviews.llvm.org/D70378 ___ cfe-commits mailing list

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 289446. steakhal added a comment. - Added `no-warning`. - Added test-case for `__builtin_unique_stable_name` as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87004/new/ https://reviews.llvm.org/D87004

[PATCH] D87031: [libTooling] Provide overloads of `rewriteDescendants` that operate directly on an AST node.

2020-09-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. ymandel requested review of this revision. The new overloads apply directly to a node, like the `clang::ast_matchers::match` functions, Rather than generating an `EditGenerator` combinator.

[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Seems reasonable to me. Just some nits. Comment at: clang/lib/Tooling/ArgumentsAdjusters.cpp:29 + auto EqualSignIndex = ArgRef.find('='); + return StringRef(ArgRef.data() + EqualSignIndex + 1); +} Instead of manually

[PATCH] D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr

2020-09-02 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. I hit this with a call to getSubExprAsWriten from the LibreOffice Clang plugin, have no idea whether it can be hit from within the compiler itself. Not sure if clang/unittests/Tooling/CastExprTest.cpp is the best place to add a test for it. Repository: rG LLVM

[PATCH] D81930: [AArch64] Add -mmark-bti-property flag.

2020-09-02 Thread Momchil Velikov via Phabricator via cfe-commits
chill accepted this revision. chill added a comment. This revision is now accepted and ready to land. LGTM. It'd be nice if we could get someone non-Arm to have a look too. though. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81930/new/ https://reviews.llvm.org/D81930

[PATCH] D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr

2020-09-02 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg created this revision. sberg added a reviewer: rsmith. Herald added a project: clang. sberg requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87030 Files: clang/lib/AST/Expr.cpp clang/unittests/Tooling/CastExprTest.cpp Index:

[PATCH] D87029: [AIX] Implement AIX special bitfield related alignment rules

2020-09-02 Thread Xiangling Liao via Phabricator via cfe-commits
Xiangling_L created this revision. Xiangling_L added reviewers: jasonliu, hubert.reinterpretcast. Herald added a project: clang. Herald added a subscriber: cfe-commits. Xiangling_L requested review of this revision. 1.[bool, char, short] bitfields have the same alignment as unsigned int 2.Adjust

[PATCH] D87028: [clang-format] Improve heuristic for detecting function declarations

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. arichardson requested review of this revision. This change also comma-separated identifiers inside

[PATCH] D85351: [Analyzer] Fix for `ExprEngine::computeObjectUnderConstruction()` for base and delegating consturctor initializers

2020-09-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. @NoQ could you please take a look on this short fix? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85351/new/ https://reviews.llvm.org/D85351 ___ cfe-commits mailing

[PATCH] D85351: [Analyzer] Fix for `ExprEngine::computeObjectUnderConstruction()` for base and delegating consturctor initializers

2020-09-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D85351#2247095 , @Szelethus wrote: > I think its a bad experience if you break something while developing. Instead > of getting a test failure for "delegating constructor initializers", you'll > have to deal with a

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-09-02 Thread Momchil Velikov via Phabricator via cfe-commits
chill added a comment. LGTM, as soon as D85649 is accepted (so they stay in sync). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80791/new/ https://reviews.llvm.org/D80791 ___ cfe-commits mailing list

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: clang/test/Analysis/eval-predefined-exprs.cpp:7-21 + clang_analyzer_dump(__func__); + clang_analyzer_dump(__FUNCTION__); + clang_analyzer_dump(__PRETTY_FUNCTION__); + // expected-warning@-3 {{{"func",0 S64b,char}}} + //

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-09-02 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/include/clang/Basic/DiagnosticSemaKinds.td:5096 +def err_fold_expression_limit_exceeded: Error< + "instantiating fold expression with %0

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/test/Analysis/eval-predefined-exprs.cpp:101 +// Such functions have no function name of predefined expressions such as: '__func__' etc. +clang_analyzer_warnIfReached(); + } Also can you please add `//

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. Awesome! Can we cover `__builtin_unique_stable_name` as well? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87004/new/ https://reviews.llvm.org/D87004 ___ cfe-commits mailing

[PATCH] D84846: [MC] Add support for generating missing GNU build notes

2020-09-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84846/new/ https://reviews.llvm.org/D84846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 289432. steakhal marked 2 inline comments as done. steakhal added a comment. We only analyze instantiated functions, which are not //dependently typed//. Safe to assume that every encountered `PredefinedExpression` has a defined (non-null) function name.

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/test/Analysis/eval-predefined-exprs.cpp:7-21 + clang_analyzer_dump(__func__); + clang_analyzer_dump(__FUNCTION__); + clang_analyzer_dump(__PRETTY_FUNCTION__); + // expected-warning@-3 {{{"func",0 S64b,char}}} + //

[PATCH] D86207: (De-)serialize BindingDecls before DecompositionDecl

2020-09-02 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Is my comment on the deserialization of `BindingDecl`s in https://reviews.llvm.org/D85613?id=284364 related to this change? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86207/new/ https://reviews.llvm.org/D86207

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: clang/test/Analysis/eval-predefined-exprs.cpp:7-21 + clang_analyzer_dump(__func__); + clang_analyzer_dump(__FUNCTION__); + clang_analyzer_dump(__PRETTY_FUNCTION__); + // expected-warning@-3 {{{"func",0 S64b,char}}} + //

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. > I don't know how could a `PredefinedExpression` lack the function name, > probably @riccibruno or @rjmccall can help with this - according to D53605 > . A `PredefinedExpr` whose declaration context is dependent has no name (see

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/test/Analysis/eval-predefined-exprs.cpp:7-21 + clang_analyzer_dump(__func__); + clang_analyzer_dump(__FUNCTION__); + clang_analyzer_dump(__PRETTY_FUNCTION__); + // expected-warning@-3 {{{"func",0 S64b,char}}} + //

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/test/Analysis/eval-predefined-exprs.cpp:7-21 + clang_analyzer_dump(__func__); + clang_analyzer_dump(__FUNCTION__); + clang_analyzer_dump(__PRETTY_FUNCTION__); + // expected-warning@-3 {{{"func",0 S64b,char}}} + //

[PATCH] D86960: [clang-format] Parse __underlying_type(T) as a type

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289406. arichardson added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86960/new/ https://reviews.llvm.org/D86960 Files: clang/lib/Format/FormatToken.h

[PATCH] D86290: Move all fields of '-cc1' option related classes into def file databases

2020-09-02 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this broke tests on windows: http://45.33.8.238/win/23171/step_7.txt Please take a look, and if it takes a while to fix, please revert for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86290/new/

[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289405. arichardson added a comment. - use valid C++ syntax in the test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86959/new/ https://reviews.llvm.org/D86959 Files:

[PATCH] D87007: [clang-format] Correctly parse function declarations with TypenameMacros

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289404. arichardson added a comment. - fix formatting of test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87007/new/ https://reviews.llvm.org/D87007 Files: clang/lib/Format/TokenAnnotator.cpp

[PATCH] D87006: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289403. arichardson added a comment. - remove unncessary cast+check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87006/new/ https://reviews.llvm.org/D87006 Files: clang/lib/Format/FormatToken.h

[PATCH] D62574: Add support for target-configurable address spaces.

2020-09-02 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:10963 +bool +ASTContext::isExplicitAddrSpaceConversionLegal(LangAS From, LangAS To) const { + // If From and To overlap, the cast is legal. ebevhan wrote: > Anastasia wrote: > > Btw I

[PATCH] D87007: [clang-format] Correctly parse function declarations with TypenameMacros

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. When using the always break after return type setting:

[PATCH] D87006: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. This improves the debugging experience since LLDB will print

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked 2 inline comments as done. steakhal added inline comments. Comment at: clang/test/Analysis/eval-predefined-exprs.cpp:1 +// RUN: %clang_analyze_cc1 --std=c++17 -analyzer-checker=core,debug.ExprInspection -verify %s + Szelethus wrote: > Isn't it

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 289395. steakhal added subscribers: riccibruno, rjmccall. steakhal added a comment. - Added tests for Microsoft extensions. - Added an `assert` requiring the `PredefinedExpression` to have a function name. I don't know how could a

[PATCH] D85128: [Prototype][SVE] Support arm_sve_vector_bits attribute

2020-09-02 Thread Cullen Rhodes via Phabricator via cfe-commits
c-rhodes abandoned this revision. c-rhodes added a comment. Closing this now the prototype has been split into separate patches that have landed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85128/new/ https://reviews.llvm.org/D85128

[PATCH] D71767: [POC][SVE] Allow code generation for fixed length vectorised loops [Patch 2/2].

2020-09-02 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm abandoned this revision. paulwalker-arm added a comment. Herald added a subscriber: ecnelises. With the exception of VSELECT lowering, which is being worked under D85364 , everything else is available in master. Repository: rG LLVM Github

[PATCH] D71760: [POC][SVE] Allow code generation for fixed length vectorised loops [Patch 1/2].

2020-09-02 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm abandoned this revision. paulwalker-arm added a comment. The intention of this patch is now complete. All work is available in master with the exception of the hook into -msve-vector-bits which is not necessarily the direction we'll use once function attributes are available.

[PATCH] D86960: [clang-format] Parse __underlying_type(T) as a type

2020-09-02 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86960/new/ https://reviews.llvm.org/D86960

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko requested changes to this revision. vsavchenko added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/StaticAnalyzer/Core/SValBuilder.cpp:311 +const auto *PE = cast(E); +return

[PATCH] D86930: [clang-format] Handle typename macros inside cast expressions

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86930#2251144 , @dougpuob wrote: > I am a beginner to compiler, interesting in how to write Unit Test case for > change so I ran it, but found difference with my expection. > > You mentioned > Before: x =

[PATCH] D86621: [clang][Sparc] Default to -mcpu=v9 for SparcV8 on Solaris

2020-09-02 Thread Rainer Orth via Phabricator via cfe-commits
ro added inline comments. Comment at: clang/lib/Basic/Targets/Sparc.cpp:224 +Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); + } } efriedma wrote: > ro wrote: > > efriedma wrote: > > > ro wrote: > > > > efriedma wrote: > > > > > This probably

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM! Nice! Comment at: clang/test/Analysis/eval-predefined-exprs.cpp:1 +// RUN: %clang_analyze_cc1 --std=c++17 -analyzer-checker=core,debug.ExprInspection -verify %s

[PATCH] D72705: [analyzer] Added new checker 'alpha.unix.ErrorReturn'.

2020-09-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D72705#2241542 , @balazske wrote: > The summary of this last discussion is that it is not acceptable to have only > the simple check for the explicit comparison with a fixed constant. At least > not for return types where

[PATCH] D87004: [analyzer] Evaluate PredefinedExpressions

2020-09-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: NoQ, Szelethus, vsavchenko, xazax.hun. Herald added subscribers: cfe-commits, ASDenysPetrov, martong, Charusso, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, whisperity. Herald added a project:

[PATCH] D86820: [X86] Add a /tune: option for clang-cl

2020-09-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86820/new/ https://reviews.llvm.org/D86820 ___ cfe-commits mailing list

[PATCH] D86958: [Docs] Add/update release notes for D71913 (LTO WPD changes)

2020-09-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. Looks great, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86958/new/ https://reviews.llvm.org/D86958 ___ cfe-commits mailing list

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-09-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:13196 + if (NumExpansions && SemaRef.getLangOpts().BracketDepth < NumExpansions) { +SemaRef.Diag(E->getEllipsisLoc(), + clang::diag::err_fold_expression_expansion_exceeded)

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-09-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 289372. hokein marked 4 inline comments as done. hokein added a comment. address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86936/new/ https://reviews.llvm.org/D86936 Files:

[PATCH] D86720: [clang][aarch64] Drop experimental from __ARM_FEATURE_SVE_BITS macro

2020-09-02 Thread David Sherwood via Phabricator via cfe-commits
david-arm accepted this revision. david-arm added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/Basic/Targets/AArch64.cpp:381 if (Opts.ArmSveVectorBits) -Builder.defineMacro("__ARM_FEATURE_SVE_BITS_EXPERIMENTAL", +

<    1   2