[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread v1nh1shungry via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 473480. v1nh1shungry added a comment. Format codes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137494/new/ https://reviews.llvm.org/D137494 Files:

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread v1nh1shungry via Phabricator via cfe-commits
v1nh1shungry added a comment. @junaire Thank you for reviewing! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137494/new/ https://reviews.llvm.org/D137494 ___ cfe-commits mailing list

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang-tools-extra/clangd/unittests/tweaks/RemoveUsingNamespaceTests.cpp:236 + } + using namespace n^s; + int main() { v1nh1shungry wrote: > junaire wrote: > > is this a typo? > I guess not. I refer to

[PATCH] D136846: [Driver] Add -fsample-profile-use-profi

2022-11-05 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D136846#3910272 , @MaskRay wrote: > In D136846#3890699 , @wenlei wrote: > >> Did you see measurable perf boost with profi on autofdo? Or what motivated >> you to turn on profi? In most

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread v1nh1shungry via Phabricator via cfe-commits
v1nh1shungry added inline comments. Comment at: clang-tools-extra/clangd/unittests/tweaks/RemoveUsingNamespaceTests.cpp:236 + } + using namespace n^s; + int main() { junaire wrote: > is this a typo? I guess not. I refer to the tests above and I

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread v1nh1shungry via Phabricator via cfe-commits
v1nh1shungry added a comment. In D137494#3910500 , @v1nh1shungry wrote: > @tom-anders Thank you for reviewing! > > I tried adding a test but I don't know how to run the tests. > > And I just found that operators declared in a class context are already

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D137494#3910500 , @v1nh1shungry wrote: > @tom-anders Thank you for reviewing! > > I tried adding a test but I don't know how to run the tests. > > And I just found that operators declared in a class context are already >

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread v1nh1shungry via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 473478. v1nh1shungry added a comment. Correct the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137494/new/ https://reviews.llvm.org/D137494 Files:

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread v1nh1shungry via Phabricator via cfe-commits
v1nh1shungry added a comment. @tom-anders Thank you for reviewing! I tried adding a test but I don't know how to run the tests. And I just found that operators declared in a class context are already handled in the existing version, but user-defined literals are not, so I rewrote the

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread v1nh1shungry via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 473477. v1nh1shungry added a comment. Correct the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137494/new/ https://reviews.llvm.org/D137494 Files:

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread v1nh1shungry via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 473475. v1nh1shungry added a comment. Add a test and rewrite the comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137494/new/ https://reviews.llvm.org/D137494 Files:

[PATCH] D137263: add boundary check for ASTUnresolvedSet::erase

2022-11-05 Thread zhouyizhou via Phabricator via cfe-commits
zhouyizhou added a comment. In D137263#3909722 , @MaskRay wrote: > I find that if I comment out ` > cast(Shadow->getDeclContext())->removeConversion(Shadow);` in > `Sema::HideUsingShadowDecl`, no test fails... So we have a missing coverage > issue.

[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

2022-11-05 Thread Noah Goldstein via Phabricator via cfe-commits
goldstein.w.n added a comment. In D137181#3904383 , @owenpan wrote: > With `ColumnLimit: 16` and `IndentPPDirectives: BeforeHash`, the format > should be: > > #ifdef foo >#define bar() \ >if (A) { \ >B(); \ >}

[clang] d1829c3 - Add support of the next Ubuntu (Ubuntu 23.04 - Lunar Lobster)

2022-11-05 Thread Sylvestre Ledru via cfe-commits
Author: Sylvestre Ledru Date: 2022-11-05T22:35:54+01:00 New Revision: d1829c308da9c2adc46640a960c105b573db6555 URL: https://github.com/llvm/llvm-project/commit/d1829c308da9c2adc46640a960c105b573db6555 DIFF:

[PATCH] D137488: [clang][Interp] Array initialization via string literal

2022-11-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1138 +// FIXME: There is a certain code duplication between here +// and Porgram::createGlobalString(). +const size_t CharWidth = SL->getCharByteWidth(); tschuett

[PATCH] D137267: [clang][Headers] Only define FLT_EVAL_METHOD for C99 and later

2022-11-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thanks! C99 and C++11 look good and the new behavior matches GCC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137267/new/

[PATCH] D137268: [clang][Headers] Do not define varargs macros for __need___va_list

2022-11-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. LGTM, but changes are needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137268/new/ https://reviews.llvm.org/D137268

[PATCH] D136846: [Driver] Add -fsample-profile-use-profi

2022-11-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. In D136846#3890699 , @wenlei wrote: > Did you see measurable perf boost with profi on autofdo? Or what motivated > you to turn on profi? In most

[PATCH] D137329: [flang] Add -f[no-]associative-math and -mreassociate

2022-11-05 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added a comment. In D137329#3909943 , @awarzynski wrote: > In D137329#3909082 , @clementval > wrote: > >> Wouldn't it be good to have a RFC for all these options and what they will >> do in

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders requested changes to this revision. tom-anders added a comment. This revision now requires changes to proceed. Did a quick test on my machine, seems to work! Can you add a regression test to clang-tools-extra/clangd/unittests/tweaks/RemoveUsingNamespaceTests.cpp though? Repository:

[PATCH] D137488: [clang][Interp] Array initialization via string literal

2022-11-05 Thread Thorsten via Phabricator via cfe-commits
tschuett added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1138 +// FIXME: There is a certain code duplication between here +// and Porgram::createGlobalString(). +const size_t CharWidth = SL->getCharByteWidth(); tschuett

[PATCH] D137487: [clang][Interp] Start implementing builtin functions

2022-11-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 473443. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137487/new/ https://reviews.llvm.org/D137487 Files: clang/lib/AST/CMakeLists.txt clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Function.h clang/lib/AST/Interp/Interp.cpp

[PATCH] D137494: [Clangd] Fix the code action `RemoveUsingNamespace`

2022-11-05 Thread v1nh1shungry via Phabricator via cfe-commits
v1nh1shungry created this revision. v1nh1shungry added reviewers: thesamesam, tom-anders, junaire. Herald added subscribers: kadircet, arphaman. Herald added a project: All. v1nh1shungry requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2022-11-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/TypeTraitsCheck.h:17 +namespace tidy { +namespace modernize { + tschuett wrote: > Why do you refuse to use nested namespaces in `modernize` ? I think this is done for legacy

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2022-11-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/TypeTraitsCheck.h:17 +namespace tidy { +namespace modernize { + tschuett wrote: > Why do you refuse to use nested namespaces in `modernize` ? Because the add_new_check script

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2022-11-05 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 473439. njames93 added a comment. Fix crash when running over llvm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137302/new/ https://reviews.llvm.org/D137302 Files:

[PATCH] D136283: [clang-tools-extra] [clangd] Split huge generated CompletionModel.cpp into smaller files

2022-11-05 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang-tools-extra/clangd/quality/CompletionModel.cmake:25 + + file(GLOB cpp_files "${output_dir}/${filename}*.cpp") + Can we list them? We try not to use globs in cmakelists.txt files. Repository: rG LLVM Github

[PATCH] D137491: [clang][NFC] Use c++17 style variable type traits

2022-11-05 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, rsmith. Herald added subscribers: steakhal, martong. Herald added a reviewer: shafik. Herald added a reviewer: NoQ. Herald added a project: All. njames93 requested review of this revision. Herald added a project: clang.

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2022-11-05 Thread Thorsten via Phabricator via cfe-commits
tschuett added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/TypeTraitsCheck.h:17 +namespace tidy { +namespace modernize { + Why do you refuse to use nested namespaces in `modernize` ? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2022-11-05 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 473427. njames93 added a comment. Fix various crashes on real world code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137302/new/ https://reviews.llvm.org/D137302 Files:

[PATCH] D137487: [clang][Interp] Start implementing builtin functions

2022-11-05 Thread Thorsten via Phabricator via cfe-commits
tschuett added inline comments. Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:14 +namespace clang { +namespace interp { + You are allowed to use nested namespaces. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D137488: [clang][Interp] Array initialization via string literal

2022-11-05 Thread Thorsten via Phabricator via cfe-commits
tschuett added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1138 +// FIXME: There is a certain code duplication between here +// and Porgram::createGlobalString(). +const size_t CharWidth = SL->getCharByteWidth(); Program

[PATCH] D137488: [clang][Interp] Array initialization via string literal

2022-11-05 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. Repository: rG LLVM Github Monorepo

[PATCH] D137487: [clang][Interp] Start implementing builtin functions

2022-11-05 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. Another try at this. This time, only implement

[PATCH] D137486: [clang-format] Correctly annotate function names before attributes

2022-11-05 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel added a comment. Are both isCpp11AttributeSpecifier and isCppAttribute required? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137486/new/ https://reviews.llvm.org/D137486 ___ cfe-commits mailing

[PATCH] D137486: [clang-format] Correctly annotate function names before attributes

2022-11-05 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: MyDeveloperDay, HazardyKnusperkeks, rymiel. owenpan added a project: clang-format. Herald added a project: All. owenpan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes

[PATCH] D136554: Implement CWG2631

2022-11-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. reduced to struct a { } constexpr b; class c { public: c(a); }; class d { d() {} c e = b; } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554

[PATCH] D137329: [flang] Add -f[no-]associative-math and -mreassociate

2022-11-05 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D137329#3909082 , @clementval wrote: > Wouldn't it be good to have a RFC for all these options and what they will do > in Flang instead of just adding them all? Or did I miss the RFC? +1 Repository: rG LLVM Github

[PATCH] D137484: [Test] Fix driverkit-path.c with lib64 dir

2022-11-05 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre created this revision. thopre added reviewers: yln, rsmith. Herald added a project: All. thopre requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D137484 Files:

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

2022-11-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 473409. tbaeder added a comment. Added a `const-fpfeatures.cpp` test and added semantics converstion to `::add` as an example. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134859/new/ https://reviews.llvm.org/D134859 Files:

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-05 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. The test in clangd/unittests/CodeCompleteTests.cpp still passes. We now probably also need a unit test for Sema that tests the new flag, right? Comment at: clang-tools-extra/clangd/CodeComplete.cpp:414 , IsPattern); + if

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-05 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 473408. tom-anders added a comment. Herald added a project: clang. Move logic to SemaCodeComplete.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040 Files:

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

2022-11-05 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/Opcodes.td:502 + let Types = [AluTypeClass]; + let Args = [ArgFltSemantics]; + let HasGroup = 1; tbaeder wrote: > jcranmer-intel wrote: > > Integer-to-floating point conversion is dependent on

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-11-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D130015#3702004 , @ckandeler wrote: > IMO the relevant point is the (non-)const-ness of the corresponding > parameter, i.e. can the passed object get mutated or not. The fact that > there's an ampersand at the call site

[PATCH] D137475: Explicitly initialize opaque pointer mode when -fthinlto-index is used

2022-11-05 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: clang/lib/CodeGen/CodeGenAction.cpp:1112 +// mixing opaque pointers and typed pointers bitcode files. +VMContext->setOpaquePointers(CI.getCodeGenOpts().OpaquePointers); + I think it would be fine to always do

[PATCH] D136936: [clang][Interp] Handle undefined functions better

2022-11-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeEmitter.cpp:24-31 + bool HasBody = true; + + // Function is not defined at all or not yet. We will + // create a Function instance but not compile the body. That + // will (maybe) happen later. if

[PATCH] D136828: [clang][Interp] Diagnose uninitialized array record fields

2022-11-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.cpp:446-448 +static void DiagnoseUninitializedSubobject(InterpState , const SourceInfo , + QualType SubObjType, +

[PATCH] D136828: [clang][Interp] Diagnose uninitialized array record fields

2022-11-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 473405. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136828/new/ https://reviews.llvm.org/D136828 Files: clang/lib/AST/Interp/Interp.cpp clang/lib/AST/Interp/Pointer.h clang/test/AST/Interp/cxx20.cpp

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

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

[PATCH] D131295: [clangd] Implement textDocument/codeLens

2022-11-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a reviewer: kadircet. nridge added a comment. Haven't had a chance to look at this yet. I do see that the earier implementation in D91930 was the subject of some design discussions about performance with @kadircet, adding him as an additional

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

2022-11-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.cpp:487 + if (S.inConstantContext()) +return true; + jcranmer-intel wrote: > Not sure I understand the conditions that cause `S.inConstantContext()` to be > true, which gives me some

[PATCH] D137223: [clang-format] Remove special case for kw_operator when aligning decls

2022-11-05 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan 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/D137223/new/ https://reviews.llvm.org/D137223