[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-07-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:2644 + +Control which arrays are considered as flexible arrays members. +can be 1 (array of size 0, 1 and undefined are considered), 2 (array of size 0 jyknight wrote:

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-07-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 442592. serge-sans-paille added a comment. Herald added a reviewer: NoQ. Do *not* try to syndicate code across different location. Alhtough that would be benefitial to the project, it also makes this patch too complex and controversial because it

[PATCH] D129061: [Lex] Diagnose macro in command lines

2022-07-05 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. great addition. Missing a test case though, which would probably trigger @aaron.ballman scenario Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129061/new/ https://reviews.llvm.org/D129061

[PATCH] D128715: [clang-tidy] Fix confusable identifiers interaction with DeclContext

2022-07-05 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D128715#3629253 , @thakis wrote: > Looks like this breaks tests on windows: > http://45.33.8.238/win/61559/step_8.txt I'm on it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D128715: [clang-tidy] Fix confusable identifiers interaction with DeclContext

2022-07-05 Thread serge 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 rG7a550212e8ff: [clang-tidy] Fix confusable identifiers interaction with DeclContext (authored by serge-sans-paille). Changed prior to commit:

[PATCH] D128783: [test] Check for more -fsanitize=array-bounds regressions

2022-07-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. I'm fine with these tests has they reflect current implementation. But beware that ubsan and `-Warray-bounds` don't behave the same wrt. FAM, which I find disturbing. I'll discuss that in another review. CHANGES

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-07-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 442084. serge-sans-paille added a comment. Fix handling of `ConstantArrayType`, thanks @aaron.ballman for the hint. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128449/new/ https://reviews.llvm.org/D128449 Files:

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-07-01 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. gentle ping o/ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D128783: [test] Check for more -fsanitize=array-bounds regressions

2022-07-01 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/test/CodeGen/bounds-checking-fam.c:59 + // CXX-STRICT-0-NOT: @__ubsan + return p->a[i] + (p->a)[i]; +} Another C++-specific behavior: if the bound results from the substitution of a template

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-06-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 441530. serge-sans-paille added a comment. Extra test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128449/new/ https://reviews.llvm.org/D128449 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D128715: [clang-tidy] Fix confusable identifiers interaction with DeclContext

2022-06-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 441505. serge-sans-paille added a comment. Update test case to take into accounts reviewers suggestions. As a consequence use a more complex approach to detect whether two `NamedDecl` may interfere. CHANGES SINCE LAST ACTION

[PATCH] D128715: [clang-tidy] Fix confusable identifiers interaction with DeclContext

2022-06-29 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @aaron.ballman : I agree with most of your suggestion except the one below that I annotated accordingly struct Base { virtual void O0(); private: void II(); }; struct Derived : Base { void OO(); // We should warn about this void

[PATCH] D128783: [test] Check for more -fsanitize=array-bounds regressions

2022-06-29 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. And note that with current clang, the behavior I describe here is not uniform across clang code base :-/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128783/new/ https://reviews.llvm.org/D128783

[PATCH] D128783: [test] Check for more -fsanitize=array-bounds regressions

2022-06-29 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D128783#3617924 , @MaskRay wrote: > Do we need a C test (just add a `-x c` RUN line)? @serge-sans-paille Do you > think we may likely make C++ stricter than C? I've started a similar discussion on

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-06-29 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 440942. serge-sans-paille added a subscriber: chandlerc. serge-sans-paille added a comment. Code updated to take into account two situations: - size resulting from macro expansion. Previous behavior was inconsistent in that situation. I chose to

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-06-28 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. GCC and Clang don't have the same behavior wrt. macros-as-abound and standard-layout-requirement, see https://godbolt.org/z/3vc4TcTYz I'm fine with keeping the CLang behavior, but do we want to keep it only for level=0, and drop it for higher level (this would

[PATCH] D128715: [clang-tidy] Fix confusable identifiers interaction with DeclContext

2022-06-28 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: aaron.ballman. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber:

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-06-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/test/Sema/array-parameter.c:2 +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -Warray-parameter -verify %s + +void f0(int a[]); aaron.ballman wrote: > aaron.ballman wrote: > > I'd like to

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-06-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 440352. serge-sans-paille marked 3 inline comments as done. serge-sans-paille added a comment. Take review into account + add C++ test file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128449/new/ https://reviews.llvm.org/D128449

[PATCH] D128643: [clang] -fsanitize=array-bounds: treat all trailing size-1 arrays as flexible

2022-06-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/include/clang/AST/Expr.h:455 + bool isFlexibleArrayMember(ASTContext , int StrictFlexArraysLevel, + bool IgnoreSizeFromMacro) const; Maybe default to `false` here?

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-06-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Thanks @MaskRay for the quick patch! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://reviews.llvm.org/D126864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-06-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 439718. serge-sans-paille added a comment. Take review into account : rework indentation, style cleaning and be more accurate about bounds reporting CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128449/new/

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-06-23 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 439435. serge-sans-paille added a comment. Activate `-Warray-parameter` on `-Wmost` but disable it by default CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128449/new/ https://reviews.llvm.org/D128449 Files: clang/docs/ReleaseNotes.rst

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-06-23 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: RKSimon, aaron.ballman, tstellar. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This warning exist in GCC[0] and

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-06-22 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 439022. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/test/SemaCXX/constexpr-late-instantiation.cpp Index:

[PATCH] D112916: [clang-tidy] Confusable identifiers detection

2022-06-22 Thread serge 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 rGc3574ef739fb: [clang-tidy] Confusable identifiers detection (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D122677: [prototype] include-cleaner library

2022-06-22 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Hey Sam, any update on this one? How can I help? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122677/new/ https://reviews.llvm.org/D122677 ___ cfe-commits mailing

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-06-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @kees does the new version looks good to you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://reviews.llvm.org/D126864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D112916: [clang-tidy] Confusable identifiers detection

2022-06-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 438592. serge-sans-paille added a comment. Address most reviewers comment: - formatting style - reduced memory consumption - be clear about TR39 divergence - class and option renaming - getName() usage CHANGES SINCE LAST ACTION

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-06-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. This also seems to fix https://github.com/llvm/llvm-project/issues/37522 and https://github.com/llvm/llvm-project/issues/55315 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-06-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 438114. serge-sans-paille added a comment. (rebased on main branch) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-06-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. I"m not 100% sure of the fix but it fixes bug #55560 and does not introduce regression :-/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119

[PATCH] D128119: [clang] enforce instantiation of constexpr template functions

2022-06-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: aaron.ballman, tbaeder. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix #55560 Repository: rG LLVM Github

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-06-16 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 437582. serge-sans-paille retitled this revision from "[clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays" to "[clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays". serge-sans-paille edited

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-15 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 does toward `-fstrict-flex-arrays=` with - `n=0` ⇒ `-fno-strict-flex-arrays`, current state (the default) - `n=1` ⇒ only consider `[ 0]`, `[1}` and `[ ]` as flex array member - `n=2` ⇒ only consider `[ 0]`

[PATCH] D112916: [clang-tidy] Confusable identifiers detection

2022-06-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 436739. serge-sans-paille marked an inline comment as done. serge-sans-paille added a comment. Take into account @aaron.ballman review CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112916/new/ https://reviews.llvm.org/D112916 Files:

[PATCH] D112916: [clang-tidy] Confusable identifiers detection

2022-06-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 436506. serge-sans-paille retitled this revision from "Confusable identifiers detection" to "[clang-tidy] Confusable identifiers detection". serge-sans-paille added a comment. Herald added a subscriber: xazax.hun. Address reviews CHANGES SINCE

[PATCH] D112916: Confusable identifiers detection

2022-06-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille reopened this revision. serge-sans-paille added a comment. This revision is now accepted and ready to land. cc @thakis CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112916/new/ https://reviews.llvm.org/D112916 ___

[PATCH] D112916: Confusable identifiers detection

2022-06-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 436399. serge-sans-paille added a comment. - quiet output of the table conversion program when everything goes well - cross-compilation support (untested) - fix identifier retrieving CHANGES SINCE LAST ACTION

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked an inline comment as done. serge-sans-paille added a comment. Looks good on my side, waiting for feedback ;-) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://reviews.llvm.org/D126864 ___ cfe-commits

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked 4 inline comments as done. serge-sans-paille added inline comments. Comment at: clang/test/CodeGen/object-size-flex-array.c:34 + // CHECK: ret i32 % + // CHECK-STRICT: ret i32 % + return OBJECT_SIZE_BUILTIN(f->c, 1); kees wrote: >

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 435900. serge-sans-paille added a comment. Cleanup testcase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://reviews.llvm.org/D126864 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 435899. serge-sans-paille added a comment. Update changelog entry CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://reviews.llvm.org/D126864 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 435520. serge-sans-paille added a comment. Herald added a subscriber: martong. Take into account @efriedma and @kees review, plus adding a bunch of extra test case CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/

[PATCH] D112916: Confusable identifiers detection

2022-06-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Thanks @thakis for the post-commit review. I'll give it another try next week. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112916/new/ https://reviews.llvm.org/D112916

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 434040. serge-sans-paille added a comment. Fix typo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://reviews.llvm.org/D126864 Files: clang/docs/ClangCommandLineReference.rst clang/docs/ReleaseNotes.rst

[PATCH] D112916: Confusable identifiers detection

2022-06-03 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb94db7ed7eaf: [clang-tidy] Confusable identifiers detection (authored by serge-sans-paille). Changed prior to commit: https://reviews.llvm.org/D112916?vs=410776=433991#toc Repository: rG LLVM Github

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Note: I named the option `-fstrict-flex-arrays` and not `-fstrict-flex-array` because we already have `-fstrict-enums`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://reviews.llvm.org/D126864

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays for stricter handling of flexible arrays

2022-06-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: george.burgess.iv, kees. Herald added subscribers: krytarowski, arichardson, emaste. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald

[PATCH] D120484: More explicit message when failing to find a mandatory cfi ressource file

2022-06-01 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb1b86b639433: [Clang][Driver] More explicit message when failing to find sanitizer resource… (authored by serge-sans-paille). Changed prior to commit:

[PATCH] D120484: More explicit message when failing to find a mandatory cfi ressource file

2022-05-31 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 433063. serge-sans-paille added a comment. Herald added a subscriber: MaskRay. Herald added a project: All. Updating test case / sorry for the delay CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120484/new/

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-05-15 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG924acb624f58: [clang] Prevent folding of non-const compound expr (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124038/new/

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-05-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 429156. serge-sans-paille added a comment. Update messed up format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124038/new/ https://reviews.llvm.org/D124038 Files: clang/lib/AST/ExprConstant.cpp

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-05-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 428562. serge-sans-paille added a comment. Update GCC manual quote CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124038/new/ https://reviews.llvm.org/D124038 Files: clang/lib/AST/ExprConstant.cpp

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-05-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D124038#3504371 , @efriedma wrote: > I think you're looking at old documentation? Here's what the current page > (https://gcc.gnu.org/onlinedocs/gcc/Compound-Literals.html) has to say: Indeed! I was looking at my

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-05-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:1609 struct X { int a[2]; }; constexpr int *n = (X){1, 2}.a; // expected-warning {{C99}} expected-warning {{temporary}} // expected-error@-1 {{constant expression}}

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-05-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 428317. serge-sans-paille edited the summary of this revision. serge-sans-paille added a comment. Added reg to GCC info page to explain current behavior, and make the test more explicit with respect to that quote. CHANGES SINCE LAST ACTION

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-05-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4267 + bool IsConstant = CLETy.isConstant(Info.Ctx); + if (!IsConstant && CLETy->isArrayType()) { +Info.FFDiag(Conv); efriedma wrote: > Is the "isArrayType()"

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-05-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 428042. serge-sans-paille added a comment. Match GCC behavior here: some test case were previously accepted while having the opposite behavior. This pacth both fixes the original issue and adopt gcc behavior. CHANGES SINCE LAST ACTION

[PATCH] D123682: [clang-tblgen] Automatically document options values

2022-04-20 Thread serge 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 rGaf7b98c383df: [clang-tblgen] Automatically document options values (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D123682: [clang-tblgen] Automatically document options values

2022-04-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 423890. serge-sans-paille marked an inline comment as done. serge-sans-paille added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Adopt a better wording. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-04-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Alternatively, the following also works, but it splits the logic into anotherplace, while current patch is at least consistent with existing state diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 498f0d4..233307f 100644

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-04-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D124038#3460731 , @efriedma wrote: > The fix doesn't look right. > > A CompoundLiteralExpr is itself an lvalue; we should catch any issues when we > visit it, not a VarDecl that contains a pointer to it. Well, the

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-04-19 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: aaron.ballman. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When a non-const compound statement is used to

[PATCH] D123682: [clang-tblgen] Automatically document options values

2022-04-15 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @aaron.ballman Any thoughs on the above suggestion? I'd be happy to adopt any of those :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123682/new/ https://reviews.llvm.org/D123682

[PATCH] D123682: [clang-tblgen] Automatically document options values

2022-04-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: MaskRay. Herald added a subscriber: StephenFan. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is a port of

[PATCH] D123308: Handle a subtle hole in inline builtin handling

2022-04-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @nickdesaulniers changes taken into account and pushed, thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123308/new/ https://reviews.llvm.org/D123308

[PATCH] D123308: Handle a subtle hole in inline builtin handling

2022-04-08 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG301e0d91354b: [Clang][Fortify] drop inline decls when redeclared (authored by serge-sans-paille). Changed prior to commit: https://reviews.llvm.org/D123308?vs=421187=421438#toc Repository: rG LLVM

[PATCH] D123308: Handle a subtle hole in inline builtin handling

2022-04-07 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: nickdesaulniers, aaron.ballman, tstellar. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When an inline builtin

[PATCH] D119996: [safestack] Support safestack in stack size diagnostics

2022-03-31 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/test/Frontend/stack-usage-safestack.c:1 +/// Check that stack frame size warnings behave the same when safe stack is enabled + I think this should be a bitcode-level test à la

[PATCH] D122378: [doc] Rely on tblgen to dump supported options value when generating doc

2022-03-29 Thread serge 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 rGf5c666742f7b: [doc] Rely on tblgen to dump supported options value when generating doc (authored by serge-sans-paille). Repository: rG LLVM

[PATCH] D122378: [doc] Rely on tblgen to dump supported options value when generating doc

2022-03-28 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 418608. serge-sans-paille added a comment. Minor Options.td nits CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122378/new/ https://reviews.llvm.org/D122378 Files: clang/include/clang/Driver/Options.td

[PATCH] D122378: [doc] Rely on tblgen to dump supported options value when generating doc

2022-03-28 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 418579. serge-sans-paille retitled this revision from "Be more explicit about -fvisibility= documentation" to "[doc] Rely on tblgen to dump supported options value when generating doc". serge-sans-paille edited the summary of this revision.

[PATCH] D122378: Be more explicit about -fvisibility= documentation

2022-03-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. thanks for the guidance. I'll check if I can update tablegen to generate possible options then :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122378/new/ https://reviews.llvm.org/D122378

[PATCH] D122378: Be more explicit about -fvisibility= documentation

2022-03-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: aaron.ballman. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When in need, I had to look into gcc info page, then

[PATCH] D121593: [clangd][WIP] Provide clang-include-cleaner

2022-03-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: kbobyrev, sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, mgorny. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added subscribers: cfe-commits, MaskRay,

[PATCH] D121592: [clangd] Expose include cleaner interface in clangd

2022-03-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald

[PATCH] D120484: More explicit message when failing to find a mandatory cfi ressource file

2022-02-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: thakis. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Compiler-rt doesn't provide support file for cfi on s390x ad ppc64le (at least). When

[PATCH] D120404: [NFC][Lexer] Remove getLangOpts function from Lexer

2022-02-23 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Lex/Lexer.h:313 + /// getSpelling - This is non-staic variant of getSpelling method which + /// doesn't require

[PATCH] D112916: Confusable identifiers detection

2022-02-23 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 410776. serge-sans-paille added a comment. Rebased on `main` branch and (should) fix @aaron.ballman portability issue. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112916/new/ https://reviews.llvm.org/D112916 Files:

[PATCH] D120334: [NFC][Lexer] Use more appropriate LangOptionsBase type for Lexer::LangOpts

2022-02-23 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. https://llvm-compile-time-tracker.com/compare.php?from=79c9072dc009693477242bc1347a2a6c3e419423=702bdad5179ebb90c8d8a16c800ffd1b3c44744d=instructions << indeed a lot of green there! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D120334: [NFC][Lexer] Use more appropriate LangOptionsBase type for Lexer::LangOpts

2022-02-23 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. A small local test hints that using a ``SmallVector`` instead of a ``std::vector`` also fixes the assembly bloat. I don't know if it's worth considering as an alternative or as an extra step. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D120333: [NFC][Lexer] Make access to LangOpts more consistent

2022-02-23 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. I don't object to the change but it may me wonder if there would be a way to remove the apparent redundancy in the API here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120333/new/

[PATCH] D120205: Restore documentation for __builtin_assume

2022-02-22 Thread serge 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 rG79c9072dc009: Restore documentation for __builtin_assume (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D120205: Restore documentation for __builtin_assume

2022-02-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: aaron.ballman, vdelvecc. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This got removed by 6cacd420a1d72bca7809e6b516fb1e18ac6056c8

[PATCH] D118781: Reduce dependencies on llvm/BinaryFormat/Dwarf.h

2022-02-04 Thread serge 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 rGffe8720aa060: Reduce dependencies on llvm/BinaryFormat/Dwarf.h (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D118781: Reduce dependencies on llvm/BinaryFormat/Dwarf.h

2022-02-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D118781#3291801 , @MaskRay wrote: > $ clang++ -E -Iinclude -I../llvm/include > ../llvm/lib/Transforms/Scalar/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc > -l > before: 10978519 > after: 11245451 > > The

[PATCH] D60380: Also document -arch as -arch is mac specific

2022-02-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. This revision is now accepted and ready to land. Thanks o/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60380/new/ https://reviews.llvm.org/D60380

[PATCH] D112916: Confusable identifiers detection

2022-02-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @rsmith : once the licensing issue has been fixed, can we merge that patch or do you have any other thought? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112916/new/ https://reviews.llvm.org/D112916 ___

[PATCH] D118781: Reduce dependencies on llvm/BinaryFormat/Dwarf.h

2022-02-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: RKSimon, MaskRay, mehdi_amini, lenary. Herald added subscribers: awarzynski, sdasgup3, wenzhicui, wrengr, Chia-hungDuan, foad, dcaballe, cota, teijeong, frasercrmck, dexonsmith, rdzhabarov, tatianashp, msifontes,

[PATCH] D118608: [NFC] Increase initial size of FoldingSets used in ASTContext and CodeGenTypes

2022-02-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Thanks, that's helpful. Any hint about why this particular values? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118608/new/ https://reviews.llvm.org/D118608 ___

[PATCH] D118652: Cleanup header dependencies in LLVMCore

2022-02-01 Thread serge 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 rGe188aae406f3: Cleanup header dependencies in LLVMCore (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D118652: Cleanup header dependencies in LLVMCore

2022-02-01 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D118652#3286018 , @mehdi_amini wrote: > I'm not sure how it'd help clients of the released version of LLVM to delay, > the development branch and the release seems fairly disconnected to me from > this point of

[PATCH] D118652: Cleanup header dependencies in LLVMCore

2022-02-01 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Hi and thanks for taking the time to go through the review. In D118652#3285601 , @MaskRay wrote: > Thanks for working on this. I spot checked some files. In general it looks > great. > > One file replaces a forward

[PATCH] D118652: Cleanup header dependencies in LLVMCore

2022-01-31 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: RKSimon, lenary, mehdi_amini, MaskRay. Herald added subscribers: jeroen.dobbelaere, ormris, foad, dexonsmith, wenlei, jdoerfert, kerbowa, pengfei, arphaman, steven_wu, hiraditya, nhaehnle, jvesely, arsenm. Herald added a

[PATCH] D118532: Fix -Wreserved-identifier in presence of system macro

2022-01-31 Thread serge 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 rGb8290ffa9fd9: Fix -Wreserved-identifier in presence of system macro (authored by serge-sans-paille). Changed prior to commit:

[PATCH] D118532: Fix -Wreserved-identifier in presence of system macro

2022-01-29 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: lebedev.ri, aaron.ballman, rsmith. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Do not warn on reserved identifiers resulting from expansion

[PATCH] D118385: [NFC] Optimize FoldingSet usage where it matters

2022-01-28 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: llvm/include/llvm/ADT/FoldingSet.h:328 /// Add* - Add various data types to Bit data. - void AddPointer(const void *Ptr); - void AddInteger(signed I); - void AddInteger(unsigned I); - void AddInteger(long I); - void

[PATCH] D118385: [NFC] Optimize FoldingSet usage where it matters

2022-01-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:214 mutable llvm::FoldingSet ComplexTypes; - mutable llvm::FoldingSet PointerTypes; + mutable llvm::FoldingSet PointerTypes{9}; mutable llvm::FoldingSet AdjustedTypes;

[PATCH] D118169: [NFC][CodeGen] Use llvm::DenseMap for DeferredDecls

2022-01-25 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. No performance regression on my side either (but only minor gains). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118169/new/ https://reviews.llvm.org/D118169

<    1   2   3   4   5   6   7   8   9   >