[PATCH] D134804: [clang][Interp] Implement bitwise Not operations

2022-09-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 464155. tbaeder marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134804/new/ https://reviews.llvm.org/D134804 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Integral.h clang/lib/AST/Interp/In

[PATCH] D134902: [clang] Implement -fstrict-flex-arrays=3

2022-09-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. I think this is missing a change in SemaChecking.cpp too. It would probably be better to first merge https://reviews.llvm.org/D134791 so that you don't have to patch (too much) multiple places :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-09-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 464156. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134859/new/ https://reviews.llvm.org/D134859 Files: clang/lib/AST/Interp/Boolean.h clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Byt

[clang] 924996e - [clang] [Driver] Disable default configs via envvar during testing

2022-09-30 Thread Michał Górny via cfe-commits
Author: Michał Górny Date: 2022-09-30T09:11:50+02:00 New Revision: 924996e0a011eb833a72d2a2cac9b40fa8a42e34 URL: https://github.com/llvm/llvm-project/commit/924996e0a011eb833a72d2a2cac9b40fa8a42e34 DIFF: https://github.com/llvm/llvm-project/commit/924996e0a011eb833a72d2a2cac9b40fa8a42e34.diff

[PATCH] D134905: [clang] [Driver] Disable default configs via envvar during testing

2022-09-30 Thread Michał Górny 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 rG924996e0a011: [clang] [Driver] Disable default configs via envvar during testing (authored by mgorny). Herald added a project: clang. Repository:

[PATCH] D125944: Template instantiation error recovery

2022-09-30 Thread Purva Chaudhari via Phabricator via cfe-commits
Purva-Chaudhari updated this revision to Diff 464159. Purva-Chaudhari added a comment. rebase, test passing locally CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125944/new/ https://reviews.llvm.org/D125944 Files: clang/include/clang/Sema/Sema.h clang/lib/Interpreter/IncrementalPar

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-09-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 464161. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134859/new/ https://reviews.llvm.org/D134859 Files: clang/lib/AST/Interp/Boolean.h clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Cont

[PATCH] D134801: [clang][Interp] Implement ConditionalOperators

2022-09-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 464165. tbaeder marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134801/new/ https://reviews.llvm.org/D134801 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/test/AST/I

[PATCH] D134801: [clang][Interp] Implement ConditionalOperators

2022-09-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:90 bool VisitOpaqueValueExpr(const OpaqueValueExpr *E); + bool VisitConditionalOperator(const ConditionalOperator *E); aaron.ballman wrote: > Do we want to handle `BinaryCondi

[PATCH] D127403: [clangd] Implement semantic token modifier "definition"

2022-09-30 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler updated this revision to Diff 464170. ckandeler marked 3 inline comments as done. ckandeler added a comment. Adapted according to latest comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127403/new/ https://reviews.llvm.org/D127403

[PATCH] D127403: [clangd] Implement semantic token modifier "definition"

2022-09-30 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:79 + if (auto *Var = dyn_cast(Decl)) +return !isa(Var) && Var->isThisDeclarationADefinition(); + return isa(Decl) || isa(Decl); I'm not 100% sure about this one,

[PATCH] D134885: [Clang] Fix variant crashes from GH58028, GH57370

2022-09-30 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 464172. royjacobson added a comment. Slightly modify the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134885/new/ https://reviews.llvm.org/D134885 Files: clang/lib/Sema/SemaInit.cpp clang/test/Se

[PATCH] D134885: [Clang] Fix variant crashes from GH58028, GH57370

2022-09-30 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson marked an inline comment as done. royjacobson added inline comments. Comment at: clang/test/SemaCXX/specialization-diagnose-crash.cpp:2 +// RUN: %clang_cc1 -fsyntax-only %s -verify +// expected-no-diagnostics +// This is a reduction of GH57370 and GH58028, originally

[clang] 9706bb3 - [Clang] Fix variant crashes from GH58028, GH57370

2022-09-30 Thread Roy Jacobson via cfe-commits
Author: Roy Jacobson Date: 2022-09-30T11:09:02+03:00 New Revision: 9706bb3165f5e508d5e2247ad8a3f45077df546d URL: https://github.com/llvm/llvm-project/commit/9706bb3165f5e508d5e2247ad8a3f45077df546d DIFF: https://github.com/llvm/llvm-project/commit/9706bb3165f5e508d5e2247ad8a3f45077df546d.diff

[PATCH] D134885: [Clang] Fix variant crashes from GH58028, GH57370

2022-09-30 Thread Roy Jacobson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. royjacobson marked an inline comment as done. Closed by commit rG9706bb3165f5: [Clang] Fix variant crashes from GH58028, GH57370 (authored by royjacobson). Repository:

[PATCH] D134898: [Clang] define __cpp_named_character_escapes

2022-09-30 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 464174. royjacobson added a comment. Remove literal suffix in accordance with the rest of the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134898/new/ https://reviews.llvm.org/D134898 Files: clang/

[PATCH] D134898: [Clang] define __cpp_named_character_escapes

2022-09-30 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D134898#3825255 , @cor3ntin wrote: > Thanks for catching that, I missed there was a feature test macro for it. > It doesn't really make sense for it to be a feature test macro (given WG21's > current policies) so I'll make

[clang] bd1bb8c - [Clang] define __cpp_named_character_escapes

2022-09-30 Thread Roy Jacobson via cfe-commits
Author: Roy Jacobson Date: 2022-09-30T11:13:18+03:00 New Revision: bd1bb8cd42548d5e50e84f52a5098eec1ee92c98 URL: https://github.com/llvm/llvm-project/commit/bd1bb8cd42548d5e50e84f52a5098eec1ee92c98 DIFF: https://github.com/llvm/llvm-project/commit/bd1bb8cd42548d5e50e84f52a5098eec1ee92c98.diff

[PATCH] D134898: [Clang] define __cpp_named_character_escapes

2022-09-30 Thread Roy Jacobson 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 rGbd1bb8cd4254: [Clang] define __cpp_named_character_escapes (authored by royjacobson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D133413: [clang-tidy] Fix crashes on `if consteval` in readability checks

2022-09-30 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel marked 2 inline comments as done. rymiel added a comment. Thank you for pointing those out, I was indeed able to cause crashes from those locations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133413/new/ https://reviews.llvm.org/D133413

[PATCH] D133413: [clang-tidy] Fix crashes on `if consteval` in readability checks

2022-09-30 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel updated this revision to Diff 464176. rymiel added a comment. Extra consteval checks in SimplifyBooleanExprCheck Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133413/new/ https://reviews.llvm.org/D133413 Files: clang-tools-extra/clang-tid

[clang] 894c0e9 - Revert "[Clang] Fix variant crashes from GH58028, GH57370"

2022-09-30 Thread Roy Jacobson via cfe-commits
Author: Roy Jacobson Date: 2022-09-30T11:24:46+03:00 New Revision: 894c0e94f9c62413feef88fd577c430839abaea7 URL: https://github.com/llvm/llvm-project/commit/894c0e94f9c62413feef88fd577c430839abaea7 DIFF: https://github.com/llvm/llvm-project/commit/894c0e94f9c62413feef88fd577c430839abaea7.diff

[PATCH] D134699: [clang][Interp] Implement This pointer passing to methods

2022-09-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 464179. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134699/new/ https://reviews.llvm.org/D134699 Files: clang/lib/AST/Interp/ByteCodeEmitter.cpp clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/I

[PATCH] D134941: [analyzer][NFC] Add tests for D132236

2022-09-30 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource created this revision. Herald added subscribers: manas, steakhal, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: All. tomasz-kaminski-sonarsource requested review of this revision.

[PATCH] D134885: [Clang] Fix variant crashes from GH58028, GH57370

2022-09-30 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson reopened this revision. royjacobson added a comment. This revision is now accepted and ready to land. Apparently some of the workers crashed with the test - https://lab.llvm.org/buildbot/#/builders/216/builds/10556, but I couldn't reproduce this locally. @shafik any idea why the diag

[PATCH] D134788: [ARM64EC][clang-cl] Add /arm64EC flag

2022-09-30 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett accepted this revision. DavidSpickett added a comment. This revision is now accepted and ready to land. Please mark comments as done if you feel that they have been addressed. (I know this can be a bit weird, do you mark them or do I, I go with the former, I can disagree if needed)

[PATCH] D134941: [analyzer][NFC] Add tests for D132236

2022-09-30 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource updated this revision to Diff 464184. tomasz-kaminski-sonarsource added a comment. Added new line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134941/new/ https://reviews.llvm.org/D134941 Files: clang/test/Analysis/N

[PATCH] D134942: [Lex] Simplify and cleanup the updateConsecutiveMacroArgTokens implementation.

2022-09-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. The code falls back to the pre-2011 partition-file-id solution (see for details ). This

[PATCH] D134115: [clang] Store in exprs the deduced arguments for function calls.

2022-09-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 464190. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134115/new/ https://reviews.llvm.org/D134115 Files: clang/include/clang/AST/ASTImporter.h clang/include/clang/AST/Expr.h clang/include/clang/Sema/Init

[PATCH] D134143: [clang] Misc type sugar preservation improvements

2022-09-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 464191. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134143/new/ https://reviews.llvm.org/D134143 Files: clang/lib/Sema/SemaCXXScopeSpec.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/SemaType.cpp Index

[PATCH] D132941: [DO NOT SUBMIT] [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-09-30 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I think this is superseded by https://cplusplus.github.io/CWG/issues/2631.html and its resolution. Which I'm looking into implementing - I'll let you know if I manage to get it working (I still have a number of failing tests). The idea is the same though, we keep a rew

[PATCH] D20401: [Lexer] Don't merge macro args from different macro files

2022-09-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. >>> @hokein or I will try to find time to take a stab at this. >> >> Awesome, please keep me in the loop. > > Will do! https://reviews.llvm.org/D134942 is my attempt. In D20401#2770059 , @nickdesaulniers wrote: >> I discussed thi

[PATCH] D134733: [clang-format][chore] transparent #include name regex

2022-09-30 Thread Konrad Wilhelm Kleine via Phabricator via cfe-commits
kwk updated this revision to Diff 464196. kwk added a comment. - Make include regex a static member and not a function - Run clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134733/new/ https://reviews.llvm.org/D134733 Files: clang/inc

[PATCH] D134852: [clang-format][NFC] Clean up class HeaderIncludes and Format.cpp

2022-09-30 Thread Konrad Wilhelm Kleine via Phabricator via cfe-commits
kwk added inline comments. Comment at: clang/lib/Format/Format.cpp:2774 - -const char CppIncludeRegexPattern[] = -R"(^[\t\ ]*#[\t\ ]*(import|include)[^"<]*(["<][^">]*[">]))"; owenpan wrote: > kwk wrote: > > MyDeveloperDay wrote: > > > Did I miss where this co

[PATCH] D134652: [clang-format] Add Basic Carbon Support/Infrastructure to clang-format

2022-09-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3671 parseRecord(); - // This does not apply to Java, JavaScript and C#. + // This does not apply to Java, JavaScript and C# or Carbon if (Style.Language == FormatStyle::LK_Java

[PATCH] D134947: [analyzer] Fix liveness of Symbols for values in regions reffered by LazyCompoundVal

2022-09-30 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource created this revision. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. tomasz-kaminski-sonars

[PATCH] D111000: [clang-format] allow clang-format to be passed a file of filenames so we can add a regression suite of "clean clang-formatted files" from LLVM

2022-09-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. One does not need to remove this, when adding response file support. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111000/new/ https://reviews.llvm.org/D111000 ___ cfe

[PATCH] D132236: [analyzer] Fix liveness of LazyCompoundVals

2022-09-30 Thread Balázs Benics via Phabricator via cfe-commits
steakhal abandoned this revision. steakhal added a comment. I'm abandoning this change in favor of D134947 . I'll leave the patch summary and the discussion here for the history. --- In D132236#3753238 , @NoQ wrote: >>

[PATCH] D134453: Introduce the `AlwaysIncludeTypeForNonTypeTemplateArgument` into printing policy

2022-09-30 Thread Nenad Mikša via Phabricator via cfe-commits
DoDoENT added a comment. > Right - I'm trying to understand what your overall goals are and what clang > needs to facilitate them, if it's suitable to do so. And it seems to me that > the right way to support them, is for your approach to change - not to rely > on the type printing to communica

[PATCH] D132941: [DO NOT SUBMIT] [Sema] Delay evaluation of std::source_location::current() in default arguments

2022-09-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a subscriber: rsmith. ilya-biryukov added a comment. In D132941#3826398 , @cor3ntin wrote: > I think this is superseded by > https://cplusplus.github.io/CWG/issues/2631.html and its resolution. > Which I'm looking into implementing -

[PATCH] D132236: [analyzer] Fix liveness of LazyCompoundVals

2022-09-30 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added a comment. > What looks fishy about getInterestingValues() is that it assumes that the > amount of interesting values is finite. This sounds incredibly wrong to me. > If a lazy compound value contains any pointer symbol `$p`, then all values in > the following

[PATCH] D133413: [clang-tidy] Fix crashes on `if consteval` in readability checks

2022-09-30 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133413/new/ https://reviews.llvm.org/D133413 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D131963: [libc++] Add custom clang-tidy checks

2022-09-30 Thread Jonathan Wakely via Phabricator via cfe-commits
jwakely added inline comments. Comment at: libcxx/test/tools/clang_tidy_checks/robust_against_adl.cpp:22 +AST_MATCHER(clang::UnresolvedLookupExpr, isCustomizationPoint) { + // TODO: Are make_error_code and make_error_condition actually customization points? + return std::range

[PATCH] D134652: [clang-format] Add Basic Carbon Support/Infrastructure to clang-format

2022-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @HazardyKnusperkeks thank you, any thoughts from you or others on if you feel its ok for me to continue? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134652/new/ https://reviews.llvm.org/D134652 ___ cfe-commi

[PATCH] D134650: [runtimes] Remove all traces of the legacy testing configuration system

2022-09-30 Thread Louis Dionne via Phabricator via cfe-commits
ldionne updated this revision to Diff 464234. ldionne added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134650/new/ https://reviews.llvm.org/D134650 Files: clang/cmake/caches/CrossWinToARMLinux.cmake libcxx/cmake

[PATCH] D134650: [runtimes] Remove all traces of the legacy testing configuration system

2022-09-30 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: clang/cmake/caches/CrossWinToARMLinux.cmake:163 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_EMULATOR "\\\"${Python3_EXECUTABLE}\\\" \\\"${LLVM_PROJECT_DIR}/llvm/utils/remote-exec.py\\\" --execdir %%T --exec-pattern=

[PATCH] D134453: Introduce the `AlwaysIncludeTypeForNonTypeTemplateArgument` into printing policy

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134453#3825902 , @dblaikie wrote: > Again, I'm not advocating for the printing as-is, I think adding the top > level name that disambiguates would be a good thing - and I think the GCC > and MSVC examples s

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:108-111 +- The :doc:`readability-avoid-const-params-in-decls + ` check does not + warn about const value parameter

[PATCH] D134671: [Driver] Prevent Mips specific code from claiming -mabi argument on other targets.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134671#3824868 , @MaskRay wrote: > In D134671#3824672 , @aaron.ballman > wrote: > >> In D134671#3824644 , >> @nickdesaulniers wrote: >

[PATCH] D134744: [clang][Interp] Implement rem opcode

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:170 + + if (LHS.isSigned() && LHS.isMin() && RHS.isNegative() && RHS.isMinusOne()) { +APSInt LHSInt = LHS.toAPSInt(); I really like how clear and generalized this predicate is!

[PATCH] D134804: [clang][Interp] Implement bitwise Not operations

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134804/new/ https://reviews.llvm.org/D134804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D134801: [clang][Interp] Implement ConditionalOperators

2022-09-30 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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134801/new/ https://reviews.llvm.org/D134801 ___ cfe-commits mailing lis

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-09-30 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 added a comment. In D134454#3826179 , @MaskRay wrote: > In D134454#3826143 , @10ne1 wrote: > >> In D134454#3824571 , @MaskRay >> wrote: >> >>> I'll grab an Arch Lin

[PATCH] D134874: [Concepts] Fix Concepts on generic lambda in a VarTemplateSpecDecl

2022-09-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 464238. erichkeane marked 10 inline comments as done. erichkeane added a comment. Did @shafik s suggestions. And yes, most of the work is just copy/pasted with slight changes to work in the new refactor, which does make it tougher to read, sorry about th

[PATCH] D134928: [Sema] Don't treat a non-null template argument as if it were null.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you also add a release note for the fix? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134928/new/ https://reviews.llvm.org/D134928 ___ cfe-commits mailing list cfe-com

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Could you please rebase from `main` and upload patch here before commit? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130130/new/ https://reviews.llvm.org/D130130 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D134958: [clang][Interp] Support __builtin_clz calls

2022-09-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I was wondering how to best implement builtin funct

[PATCH] D134813: Properly print unnamed TagDecl objects in diagnostics

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: sammccall. aaron.ballman added a comment. The clangd test failure found by precommit CI is stumping me as to how to resolve it. @sammccall -- can you help me out? The issue is that the test is expecting no name but now we're printing more information, but that i

[PATCH] D134958: [clang][Interp] Support __builtin_clz calls

2022-09-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:16-19 + auto Arg = S.Stk.pop>(); + auto Result = Arg.countLeadingZeros(); + S.Stk.push>(Integral<32, true>::from(Result)); + return true; This would also work as: ``` auto Ar

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Thomas Etter via Phabricator via cfe-commits
thomasetter updated this revision to Diff 464250. thomasetter added a comment. rebased CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130130/new/ https://reviews.llvm.org/D130130 Files: clang-tools-extra/clang-tidy/readability/AvoidConstParamsInDecls.cpp clang-tools-extra/clang-tidy

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Thank you! Just wanted to ensure alphabetical order in `Changes in existing checks` :-) Fine to merge. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130130/new/ https://reviews.llvm.org/D130130 ___ cfe-commit

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Thomas Etter via Phabricator via cfe-commits
thomasetter updated this revision to Diff 464251. thomasetter added a comment. Applied review changes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130130/new/ https://reviews.llvm.org/D130130 Files: clang-tools-extra/clang-tidy/readability/AvoidConstParamsInDecls.cpp clang-tools-e

[PATCH] D134958: [clang][Interp] Support __builtin_clz calls

2022-09-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. This seems right enough to me, though you might consider CTZ as well since it is equally as easy. A better/more useful attempt is going to be builtin_strlen. Note that with builtins they are going to be particularly difficult because you can't execute them on the

[PATCH] D134853: [clang-format] Correctly annotate UDLs as OverloadedOperator

2022-09-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Looks good. You could add a FIXME before the commented out tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134853/new/ https://reviews.llvm.org/D134853 ___ cfe-co

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Thomas Etter via Phabricator via cfe-commits
thomasetter marked an inline comment as done. thomasetter added a comment. Thanks for the review! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130130/new/ https://reviews.llvm.org/D130130 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D134958: [clang][Interp] Support __builtin_clz calls

2022-09-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D134958#3827024 , @erichkeane wrote: > This seems right enough to me, though you might consider CTZ as well since > it is equally as easy. A better/more useful attempt is going to be > builtin_strlen. Note that with built

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: dexonsmith, dnovillo. aaron.ballman added subscribers: dexonsmith, dnovillo. aaron.ballman added a comment. In D134456#3819185 , @rnk wrote: > In D134456#3819042 , @aaron.ballman >

[PATCH] D134958: [clang][Interp] Support __builtin_clz calls

2022-09-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D134958#3827038 , @tbaeder wrote: > In D134958#3827024 , @erichkeane > wrote: > >> This seems right enough to me, though you might consider CTZ as well since >> it is equally as e

[PATCH] D134958: [clang][Interp] Support __builtin_clz calls

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134958#3827038 , @tbaeder wrote: > In D134958#3827024 , @erichkeane > wrote: > >> This seems right enough to me, though you might consider CTZ as well since >> it is equally a

[PATCH] D130513: [Flang] Add -fconvert option to swap endianness for unformatted files

2022-09-30 Thread Jean Perier via Phabricator via cfe-commits
jeanPerier accepted this revision. jeanPerier added a comment. This revision is now accepted and ready to land. The lowering part looks good to me (I only have a minor comment inlined about a header used in lowering). Comment at: flang/include/flang/Runtime/environment-default

[PATCH] D132416: [Driver][Fuchsia] Add default linker flags

2022-09-30 Thread Alex Brachet 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 rG5dfc8ebee5d6: [Driver][Fuchsia] Add default linker flags (authored by abrachet). Herald added a project: clang. Herald added a subscriber: cfe-commit

[clang] 5dfc8eb - [Driver][Fuchsia] Add default linker flags

2022-09-30 Thread Alex Brachet via cfe-commits
Author: Alex Brachet Date: 2022-09-30T14:07:41Z New Revision: 5dfc8ebee5d688ee94607ccce655672c1a198b82 URL: https://github.com/llvm/llvm-project/commit/5dfc8ebee5d688ee94607ccce655672c1a198b82 DIFF: https://github.com/llvm/llvm-project/commit/5dfc8ebee5d688ee94607ccce655672c1a198b82.diff LOG:

[PATCH] D134831: [Clang][Sema] Add -Wcast-function-type-strict

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:229-231 +- Introduced ``-Wcast-function-type-strict`` to warn about function type mismatches + in casts that may result in runtime indirect call `Control-Flow Integrity (CFI) +

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D134456#3827040 , @aaron.ballman wrote: > In D134456#3819185 , @rnk wrote: > >> In D134456#3819042 , >> @aaron.ballman wrote: >> >>> Alter

[PATCH] D134942: [Lex] Simplify and cleanup the updateConsecutiveMacroArgTokens implementation.

2022-09-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Some more perf data on building linux kernel (x86_64) before: getFileID 2.4% (1.10% on `getFileIDSlow`) after: getFileID 2.35% (1.05% on `getFileIDSlow`) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134942/new/ https://rev

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9a4e52ebeb6d: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in… (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[clang-tools-extra] 9a4e52e - [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-09-30T14:27:02Z New Revision: 9a4e52ebeb6dd8527bc1ee944a9466d68a95b6f1 URL: https://github.com/llvm/llvm-project/commit/9a4e52ebeb6dd8527bc1ee944a9466d68a95b6f1 DIFF: https://github.com/llvm/llvm-project/commit/9a4e52ebeb6dd8527bc1ee944a9466d68a95b6f1.diff

[PATCH] D132416: [Driver][Fuchsia] Add default linker flags

2022-09-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This breaks tests on non-linux: http://45.33.8.238/macm1/45619/step_7.txt http://45.33.8.238/win/67193/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3827185 , @dexonsmith wrote: > In D134456#3827040 , @aaron.ballman > wrote: > >> In D134456#3819185 , @rnk wrote: >> >>> In D13

[clang-tools-extra] 40f5c63 - [NFC] Fix for doc typo in commit 9a4e52ebeb6d

2022-09-30 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-09-30T14:53:18Z New Revision: 40f5c634bc991510427e274ba49d4c56f29ef593 URL: https://github.com/llvm/llvm-project/commit/40f5c634bc991510427e274ba49d4c56f29ef593 DIFF: https://github.com/llvm/llvm-project/commit/40f5c634bc991510427e274ba49d4c56f29ef593.diff

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D134456#3827263 , @aaron.ballman wrote: > In D134456#3827185 , @dexonsmith > wrote: > >> This safety scenario sounds like it could differ within a file. Is a flag >> really the ri

[clang] 9ec7272 - Revert "[Driver][Fuchsia] Add default linker flags"

2022-09-30 Thread Alex Brachet via cfe-commits
Author: Alex Brachet Date: 2022-09-30T14:54:48Z New Revision: 9ec7272fc5eab5295372d46f2f1d59b10907c093 URL: https://github.com/llvm/llvm-project/commit/9ec7272fc5eab5295372d46f2f1d59b10907c093 DIFF: https://github.com/llvm/llvm-project/commit/9ec7272fc5eab5295372d46f2f1d59b10907c093.diff LOG:

[PATCH] D130130: [clang-tidy] Add an IgnoreMacros option to readability-avoid-const-params-in-decls

2022-09-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Note: fixed typo in doc in followup commit 40f5c634bc991510427e274ba49d4c56f29ef593 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130130/new/ https://

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3827281 , @dexonsmith wrote: > In D134456#3827263 , @aaron.ballman > wrote: > >> In D134456#3827185 , @dexonsmith >> wrote: >>

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D134456#3827263 , @aaron.ballman wrote: > My worry is that parallel attributes will be used as: > > #if __has_cpp_attribute(clang::likely_but_honor_this_one) > #define LIKELY [[clang::likely_but_honor_this_one]] > #el

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D134456#3827332 , @dexonsmith wrote: > In D134456#3827263 , @aaron.ballman > wrote: > >> My worry is that parallel attributes will be used as: >> >> #if __has_cpp_attribute(clang

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3827332 , @dexonsmith wrote: > In D134456#3827263 , @aaron.ballman > wrote: > >> My worry is that parallel attributes will be used as: >> >> #if __has_cpp_attribute(cl

[PATCH] D134885: [Clang] Fix variant crashes from GH58028, GH57370

2022-09-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D134885#3826335 , @royjacobson wrote: > Apparently some of the workers crashed with the test - > https://lab.llvm.org/buildbot/#/builders/216/builds/10556, but I couldn't > reproduce this locally. @shafik any idea why the

[PATCH] D133119: [clang-tidy] Add checker 'bugprone-suspicious-realloc-usage'.

2022-09-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 464291. balazske added a comment. Added simple check for create of copy of pointer before the `realloc` call. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133119/new/ https://reviews.llvm.org/D133119 Files:

[PATCH] D134885: [Clang] Fix variant crashes from GH58028, GH57370

2022-09-30 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D134885#3827383 , @erichkeane wrote: > In D134885#3826335 , @royjacobson > wrote: > >> Apparently some of the workers crashed with the test - >> https://lab.llvm.org/buildbot/#/b

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D134456#3827377 , @aaron.ballman wrote: > In D134456#3827332 , @dexonsmith > wrote: > >> In D134456#3827263 , >> @aaron.ballman wrote: >>

[PATCH] D133119: [clang-tidy] Add checker 'bugprone-suspicious-realloc-usage'.

2022-09-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added a comment. I added a simple detection of create a copy of `p` before `p = realloc(p, ...)`. This can remove the warning at very obvious cases when a copy of `p` is created (but even if the copy is made inside an `if` branch for example).

[PATCH] D134885: [Clang] Fix variant crashes from GH58028, GH57370

2022-09-30 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Only thing I can think of is the 'Aggregate' calculation for this diagnostic is going wrong somewhere. See SemaDeclcXX.cpp ~6759 for where this all happens. Aggregate IS initialized correctly to 'true' in CXXRecordDecl's DefinitionData as far as I can tell. BUT I c

[PATCH] D134176: Add MC support of RISCV Zcf Extension

2022-09-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper 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/D134176/new/ https://reviews.llvm.org/D134176 ___

[PATCH] D134177: Add MC support of RISCV Zcd Extension

2022-09-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper 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/D134177/new/ https://reviews.llvm.org/D134177 ___

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3827410 , @dexonsmith wrote: > In D134456#3827377 , @aaron.ballman > wrote: > >> Ah, I see, thank you for clarifying! Does that seem like a generally useful >> attribut

[PATCH] D134885: [Clang] Fix variant crashes from GH58028, GH57370

2022-09-30 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D134885#3826335 , @royjacobson wrote: > Apparently some of the workers crashed with the test - > https://lab.llvm.org/buildbot/#/builders/216/builds/10556, but I couldn't > reproduce this locally. @shafik any idea why the dia

[PATCH] D20401: [Lexer] Don't merge macro args from different macro files

2022-09-30 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D20401#3824713 , @sammccall wrote: > Thanks Nick for the info! No kernel experience here, so if you have any > particular suggestions about how to measure the workload you care about it'd > be much appreciated (e.g. ar

[PATCH] D134337: [clang] [Driver] More flexible rules for loading default configs

2022-09-30 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D134337#3824862 , @MaskRay wrote: > It's unclear Clang wants to support GCC style specs file and whether GCC > wants to adopt another system beside its specs. > I lean toward there isn't much cooperation as we might th

[PATCH] D134885: [Clang] Fix variant crashes from GH58028, GH57370

2022-09-30 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. In D134885#3827479 , @shafik wrote: > In D134885#3826335 , @royjacobson > wrote: > >> Apparently some of the workers crashed with the test - >> https://lab.llvm.org/buildbot/#/builde

  1   2   >