[PATCH] D152023: [UBSan] Consider zero input to __builtin_clz/ctz to be undefined independent of the target.

2023-06-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: efriedma, nikic, vsk. Herald added a subscriber: StephenFan. Herald added a project: All. craig.topper requested review of this revision. Herald added a project: clang. Previously we checked isCLZForZeroUndef and only added UBSan ch

[PATCH] D152023: [UBSan] Consider zero input to __builtin_clz/ctz to be undefined independent of the target.

2023-06-02 Thread Nikita Popov via Phabricator via cfe-commits
nikic accepted this revision. nikic 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/D152023/new/ https://reviews.llvm.org/D152023 ___ c

[PATCH] D134334: [Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template name

2023-06-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 527937. shafik added a comment. - Update check to use tok::annot_cxxscope CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134334/new/ https://reviews.llvm.org/D134334 Files: clang/docs/ReleaseNotes.rst clang/lib/Parse/ParseTentative.cpp clang/te

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivateForVarInit try ConstExprEmitter fast-path first

2023-06-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1324 // This is a string literal initializing an array in an initializer. -return CGM.GetConstantArrayFromStringLiteral(E); +return E->isLValue() ? + CGM.GetAddrOfConstantStringFrom

[PATCH] D134334: [Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template name

2023-06-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik marked an inline comment as done. shafik added inline comments. Comment at: clang/lib/Parse/ParseTentative.cpp:1553-1554 return TPResult::Error; - if (Tok.isNot(tok::identifier)) + if (NextToken().isNot(tok::identifier))

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivateForVarInit try ConstExprEmitter fast-path first

2023-06-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1209 +return VisitCastExpr(I, T); + } + llvm::Constant *VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *C, QualType T) { ConstExprEmitter should inherit an identical impleme

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-02 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. I'm traveling but will look at this on Monday. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152017/new/ https://reviews.llvm.org/D152017 ___ cfe-commits mailing list cfe-commi

[PATCH] D148490: [AIX] use system assembler for assembly files

2023-06-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/target-as.s:1 // Make sure the -march is passed down to cc1as. // RUN: %clang -target i386-unknown-freebsd -### -c -integrated-as %s \ shchenz wrote: > MaskRay wrote: > > shchenz wrote: > > > MaskRay

[clang] 18ccca4 - [UBSan] Consider zero input to __builtin_clz/ctz to be undefined independent of the target.

2023-06-02 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-06-02T13:01:05-07:00 New Revision: 18ccca4da8dec5fbfd1072a1c1544ce25f528627 URL: https://github.com/llvm/llvm-project/commit/18ccca4da8dec5fbfd1072a1c1544ce25f528627 DIFF: https://github.com/llvm/llvm-project/commit/18ccca4da8dec5fbfd1072a1c1544ce25f528627.diff

[PATCH] D152023: [UBSan] Consider zero input to __builtin_clz/ctz to be undefined independent of the target.

2023-06-02 Thread Craig Topper 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 rG18ccca4da8de: [UBSan] Consider zero input to __builtin_clz/ctz to be undefined independent of… (authored by craig.topper). Repository: rG LLVM Git

[clang] 02ce49a - [NFC][CLANG] Fix bug with dereference null return value in GetFunctionTypeForVTable()

2023-06-02 Thread via cfe-commits
Author: Manna, Soumi Date: 2023-06-02T13:28:06-07:00 New Revision: 02ce49afb9a078932c74f4d9b43189a5567e54e9 URL: https://github.com/llvm/llvm-project/commit/02ce49afb9a078932c74f4d9b43189a5567e54e9 DIFF: https://github.com/llvm/llvm-project/commit/02ce49afb9a078932c74f4d9b43189a5567e54e9.diff

[PATCH] D151957: [NFC][CLANG] Fix bug with dereference null return value in GetFunctionTypeForVTable()

2023-06-02 Thread Soumi Manna via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG02ce49afb9a0: [NFC][CLANG] Fix bug with dereference null return value in… (authored by Manna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151957/new/ htt

[PATCH] D152027: [CUDA] Update Kepler(sm_3*) support info.

2023-06-02 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. Herald added subscribers: mattd, carlosgalvezp, bixia, yaxunl. Herald added a project: All. tra published this revision for review. tra added a reviewer: jlebar. tra added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Kepler is gone! L

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivateForVarInit try ConstExprEmitter fast-path first

2023-06-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added reviewers: efriedma, rsmith. efriedma added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1324 // This is a string literal initializing an array in an initializer. -return CGM.GetConstantArrayFromStringLiteral(E); +return E->isLValu

[PATCH] D151834: Include math-errno with fast-math

2023-06-02 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 527950. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151834/new/ https://reviews.llvm.org/D151834 Files: clang/include/clang/Basic/FPOptions.def clang/include/clang/Basic/LangOptions.h clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGCal

[PATCH] D146148: Float_t and double_t types shouldn't be modified by #pragma clang fp eval_method

2023-06-02 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146148/new/ https://reviews.llvm.org/D146148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions

2023-06-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. This is pretty cool, even if it's just for data gathering. It's interesting that 29% of .debug_info and .debug_str is for describing class methods, that's pretty significant, even if it's only a 13% reduction across all debug info sections. Repository: rG LLVM Github Mo

[clang] 8265994 - [NFC][CLANG] Fix Static Code Analyzer Concerns with dereference null return value in applyObjCTypeArgs()

2023-06-02 Thread via cfe-commits
Author: Manna, Soumi Date: 2023-06-02T13:40:45-07:00 New Revision: 82659941ccb88605ae4288f7506ef11e5fe3fc17 URL: https://github.com/llvm/llvm-project/commit/82659941ccb88605ae4288f7506ef11e5fe3fc17 DIFF: https://github.com/llvm/llvm-project/commit/82659941ccb88605ae4288f7506ef11e5fe3fc17.diff

[PATCH] D151964: [NFC][CLANG] Fix Static Code Analyzer Concerns with dereference null return value in applyObjCTypeArgs()

2023-06-02 Thread Soumi Manna via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG82659941ccb8: [NFC][CLANG] Fix Static Code Analyzer Concerns with dereference null return… (authored by Manna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D151923: [APFloat] Add APFloat semantic support for TF32

2023-06-02 Thread Jeremy Furtek via Phabricator via cfe-commits
jfurtek updated this revision to Diff 527968. jfurtek added a comment. - Fix comment and clang-formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151923/new/ https://reviews.llvm.org/D151923 Files: clang/lib/AST/MicrosoftMangle.cpp llvm/

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivateForVarInit try ConstExprEmitter fast-path first

2023-06-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1324 // This is a string literal initializing an array in an initializer. -return CGM.GetConstantArrayFromStringLiteral(E); +return E->isLValue() ? + CGM.GetAddrOfConstantStringFrom

[PATCH] D151923: [APFloat] Add APFloat semantic support for TF32

2023-06-02 Thread Jeremy Furtek via Phabricator via cfe-commits
jfurtek added inline comments. Comment at: llvm/include/llvm/ADT/APFloat.h:190 +// greater throughput than single precision (32-bit) formats. +S_FloatTF32, majnemer wrote: > Hmm, this says improved precision than half but the semantics you gave say >

[clang] 0f49116 - [CUDA] Update Kepler(sm_3*) support info.

2023-06-02 Thread Artem Belevich via cfe-commits
Author: Artem Belevich Date: 2023-06-02T14:16:13-07:00 New Revision: 0f49116e261cf5a156221b006acb677e3565fd1a URL: https://github.com/llvm/llvm-project/commit/0f49116e261cf5a156221b006acb677e3565fd1a DIFF: https://github.com/llvm/llvm-project/commit/0f49116e261cf5a156221b006acb677e3565fd1a.diff

[PATCH] D152027: [CUDA] Update Kepler(sm_3*) support info.

2023-06-02 Thread Artem Belevich 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 rG0f49116e261c: [CUDA] Update Kepler(sm_3*) support info. (authored by tra). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D152034: [clang][NFC] refactors value type traits so we can have more than bools

2023-06-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added reviewers: erichkeane, dblaikie. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Since all the type traits up until now have had Boolean vaules, we've always been able

[PATCH] D151952: [clang] adds `__type_pack_index` so we can get a type's parameter pack index

2023-06-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5620 + if (Kind == clang::TT_TypePackIndex) +return EvaluateIntegralTypeTrait(*this, Kind, KWLoc, Args, RParenLoc, erichkeane wrote: > I realize this is the 1st, but this seems like it

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivateForVarInit try ConstExprEmitter fast-path first

2023-06-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 527978. nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. - remove unnecessary Visit*CastExpr overrides Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151587/new/ https:/

[PATCH] D151952: [clang] adds `__type_pack_index` so we can get a type's parameter pack index

2023-06-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5620 + if (Kind == clang::TT_TypePackIndex) +return EvaluateIntegralTypeTrait(*this, Kind, KWLoc, Args, RParenLoc, cjdb wrote: > erichkeane wrote: > > I realize this is the 1st, b

[PATCH] D134334: [Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template name

2023-06-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. `clang/test/ClangScanDeps/modules-full.cpp ` passes locally for me and I don't see why my change would effect this test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134334/new/ https://reviews.llvm.org/D134334 ___ c

[PATCH] D151834: Include math-errno with fast-math

2023-06-02 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: clang/include/clang/Basic/FPOptions.def:30 OPTION(BFloat16ExcessPrecision, LangOptions::ExcessPrecisionKind, 2, FPEvalMethod) +OPTION(MathErrno, bool, 1, BFloat16ExcessPrecision) #undef OPTION Does this mean M

[PATCH] D152009: [clang] Fix assertion while parsing an invalid for loop

2023-06-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:2200 Diag(Tok, diag::err_expected_semi_for); - else -// Skip until semicolon or rparen, don't consume it. Can you explain why you removed this? Commen

[PATCH] D147218: [OpenMP][Flang][MLIR] Lowering of OpenMP requires directive from parse tree to MLIR

2023-06-02 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added inline comments. Comment at: flang/lib/Lower/Bridge.cpp:271 +bridge{bridge}, foldingContext{bridge.createFoldingContext()}, +ompRequiresFlags{mlir::omp::ClauseRequires::none} {} virtual ~FirConverter() = default; Is this

[clang] 14c44df - clang: Update tests after InstSimplify change

2023-06-02 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2023-06-02T18:47:58-04:00 New Revision: 14c44dfbcf1d6f81c1cdaa90ed243b3d53147903 URL: https://github.com/llvm/llvm-project/commit/14c44dfbcf1d6f81c1cdaa90ed243b3d53147903 DIFF: https://github.com/llvm/llvm-project/commit/14c44dfbcf1d6f81c1cdaa90ed243b3d53147903.diff

[PATCH] D132275: [clang] Create alloca to pass into static lambda

2023-06-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added subscribers: jdoerfert, leonardchan. leonardchan added a comment. Hi. For an embedded device, prior to this patch, we used to be able to see a significant savings of 28kB when we enabled the attributor. But with this patch, we don't see these savings anymore when enabling the a

[PATCH] D134334: [Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template name

2023-06-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Parse/ParseTentative.cpp:1553-1554 return TPResult::Error; - if (Tok.isNot(tok::identifier)) + if (NextToken().isNot(tok::identifier)) break; } ---

[PATCH] D151952: [clang] adds `__type_pack_index` so we can get a type's parameter pack index

2023-06-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Taking a step back for a moment: what is the intended use case for this? My concern is that most of the time you're going to want to make O(N) such queries into a pack of N elements, resulting in O(N^2) compile time, much like we regrettably get from uses of `__type_pack

[PATCH] D131594: WORK IN PROGRESS Add Clang UEFI target to support "x86_64-unknown-uefi" triple

2023-06-02 Thread Prabhu Karthikeyan Rajasekaran via Phabricator via cfe-commits
Prabhuk updated this revision to Diff 528064. Prabhuk added a comment. Simplifying the patch to include just the scaffolding for X86_64 platform. Removing the predefines to be added as a separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D152051: libclang-cpp: Add external visibility attribute to all classes

2023-06-02 Thread Tom Stellard via Phabricator via cfe-commits
tstellar created this revision. Herald added subscribers: cfe-commits, PiotrZSL, luke, steakhal, carlosgalvezp, frasercrmck, wenlei, luismarques, apazos, sameer.abuasal, s.egerton, Jim, mstorsjo, jocewei, PkmX, arphaman, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, n

[PATCH] D152051: libclang-cpp: Add external visibility attribute to all classes

2023-06-02 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. I was not sure what to do with inline functions and also functions that were implemented in the headers, so I did not add the LLVM_EXTERNAL_VISIBILITY macro to most of those functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D151761: clang-format: Add AlignConsecutiveShortCaseStatements

2023-06-02 Thread Galen Elias via Phabricator via cfe-commits
galenelias updated this revision to Diff 528072. galenelias marked 3 inline comments as done. galenelias retitled this revision from "clang-format: Add AlignConsecutiveShortCaseLabels" to "clang-format: Add AlignConsecutiveShortCaseStatements". galenelias edited the summary of this revision. CHA

[PATCH] D151833: Respect "-fdiagnostics-absolute-paths" on emit include location

2023-06-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/Frontend/absolute-paths.c:6 +// NORMAL: In file included from [[ROOT_ABSOLUTE]]:4: +// ABSOLUTE: In file included from [[ROOT_ABSOLUTE]]:4: charmitro wrote: > tbaeder wrote: > > charmitro wrote: > > > tbaede

[PATCH] D147875: [clang][Diagnostics] Show line numbers when printing code snippets

2023-06-02 Thread Douglas Yung via Phabricator via cfe-commits
dyung added inline comments. Comment at: clang/docs/ReleaseNotes.rst:290 + number of code lines it prints has been increased from 1 to 16. This + can be controlled using ``-fcaret-diagnostics-max-lines=``. Is this correct? I notice that all of the tests you u

[PATCH] D147875: [clang][Diagnostics] Show line numbers when printing code snippets

2023-06-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/docs/ReleaseNotes.rst:290 + number of code lines it prints has been increased from 1 to 16. This + can be controlled using ``-fcaret-diagnostics-max-lines=``. dyung wrote: > Is this correct? I notice that all o

[PATCH] D141907: [CMake] Ensure `CLANG_RESOURCE_DIR` is respected

2023-06-02 Thread Junchang Liu via Phabricator via cfe-commits
paperchalice added a comment. In D141907#4361594 , @tstellar wrote: > In D141907#4355229 , @paperchalice > wrote: > >> In D141907#4355228 , @tstellar >> wrote: >> >>> @p

<    1   2