[PATCH] D127201: [clang] Add tests for statement expression in initializers

2022-06-13 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders added a comment. In D127201#3578077 , @aaron.ballman wrote: > Thanks for adding some more test coverage! Would it be worth mentioning the > miscompile fix in the release notes more explicitly? Yes, might be a good idea, in particualar as some c

[PATCH] D125400: [clang][Analyzer] Add errno state to standard functions modeling.

2022-06-13 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/test/Analysis/errno-stdlibraryfunctions-notes.c:15-23 +void test1() { + access("path", 0); // no note here + access("path", 0); + // expected-note@-1{{Assuming that function 'access' is successful, in this case the value 'errno

[PATCH] D127663: [clang][lex] NFCI: Use DirectoryEntryRef in HeaderSearch::LookupFile

2022-06-13 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added a reviewer: bnbarham. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch changes the argument type to `HeaderSearch::LookupFile()` from

[PATCH] D127485: [analyzer][NFC] Remove unused Analyses enum

2022-06-13 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong 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/D127485/new/ https://reviews.llvm.org/D127485 _

[PATCH] D127306: [analyzer] Treat system globals as mutable if they are not const

2022-06-13 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Ok, LGTM Comment at: clang/test/Analysis/globals-are-not-always-immutable.c:70 + invalidate_globals(); + clang_analyzer_eval(my_mutable_system_global == x); // expected-w

[PATCH] D123771: [clang][lex] NFCI: Use DirectoryEntryRef in HeaderSearch::load*()

2022-06-13 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 closed this revision. jansvoboda11 added a comment. Re-committed as d9390b6ac387345e7d3348bfc648929bc349d6b1 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123771/ne

[PATCH] D127519: [clang-cl] Accept /FA[c][s][u], but ignore the arguments

2022-06-13 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 436436. steplong added a comment. - Removed SLASH_FA_joined and made SLASH_FA a CLJoined - Add some /FAcsu tests. Just copies of /FA tests, but passing /FAcsu Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D12751

[PATCH] D127519: [clang-cl] Accept /FA[c][s][u], but ignore the arguments

2022-06-13 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127519/new/ https://reviews.llvm.org/D127519 ___ cfe

[PATCH] D126984: [clang] Add initial support for gcc's optimize function attribute

2022-06-13 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 436443. steplong added a comment. - Add llvm::Attribute::MinSize when OptimizeAttr::Oz - Add test for checking minsize Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126984/new/ https://reviews.llvm.org/D126984

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-06-13 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. Gentle Ping. All the previous issues are fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124751/new/ https://reviews.llvm.org/D124751 ___ cfe-commits mailing list cfe-c

[PATCH] D127471: [Coroutines] Convert coroutine.presplit to enum attr

2022-06-13 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. LGTM. Don't worry about Swift, we'll handle it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127471/new/ https://reviews.llvm.org/D127471 ___

[PATCH] D127647: [clang][lex] NFCI: Use FileEntryRef in ModuleMap::{load,lookup}ModuleMap()

2022-06-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham accepted this revision. bnbarham added a comment. This revision is now accepted and ready to land. Few small comments, LGTM otherwise. Comment at: clang/include/clang/Lex/HeaderSearch.h:627 /// Try to find a module map file in the given directory, returning /// \

[PATCH] D127648: [clang][lex] NFCI: Use DirectoryEntryRef in ModuleMap::inferFrameworkModule()

2022-06-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham accepted this revision. bnbarham added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Lex/ModuleMap.cpp:1028 // Look for an umbrella header. - SmallString<128> UmbrellaName = StringRef(FrameworkDir->getName()); + SmallString<

[PATCH] D126781: [CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder

2022-06-13 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. Looks like this broke the ASan buildbot (and may have been missed because the bot was already red at the time): https://lab.llvm.org/buildbot/#/builders/5/builds/24588 Instructions on how to repro the bot are here: https://github.com/google/sanitizers/wiki/SanitizerBotRe

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-06-13 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. gentle ping.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115844/new/ https://reviews.llvm.org/D115844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D127651: [clang][lex] NFCI: Use DirectoryEntryRef in ModuleMap::parseModuleMapFile()

2022-06-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham accepted this revision. bnbarham added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/modularize/ModularizeUtilities.cpp:275 // Figure out the home directory for the module map file. - const DirectoryEntry *Dir = Modul

[PATCH] D127379: [Lex] Keep track of skipped preprocessor blocks and advance the lexer directly if they are revisited

2022-06-13 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Lex/PPDirectives.cpp:514 + BeginPtr = PP.CurLexer->getBufferLocation(); + SkipRangePtr = &PP.RecordedSkippedRanges[BeginPtr]; + if (*SkipRangePtr) { Storing this pointer is only safe as long

[clang] d90eecf - Revert "Also move WeakRefReferences in CodeGenModule::moveLazyEmssionStates"

2022-06-13 Thread Mitch Phillips via cfe-commits
Author: Mitch Phillips Date: 2022-06-13T10:12:38-07:00 New Revision: d90eecff5c9e7e9f8263de6cd72d70322400829f URL: https://github.com/llvm/llvm-project/commit/d90eecff5c9e7e9f8263de6cd72d70322400829f DIFF: https://github.com/llvm/llvm-project/commit/d90eecff5c9e7e9f8263de6cd72d70322400829f.diff

[clang] d3ddc25 - Revert "[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder"

2022-06-13 Thread Mitch Phillips via cfe-commits
Author: Mitch Phillips Date: 2022-06-13T10:12:38-07:00 New Revision: d3ddc251acae631bf5ab4da13878f7e8b5b5a451 URL: https://github.com/llvm/llvm-project/commit/d3ddc251acae631bf5ab4da13878f7e8b5b5a451 DIFF: https://github.com/llvm/llvm-project/commit/d3ddc251acae631bf5ab4da13878f7e8b5b5a451.diff

[PATCH] D125693: [DebugInfo][WIP] Support types, imports and static locals declared in a lexical block (3/5)

2022-06-13 Thread Kristina Bessonova via Phabricator via cfe-commits
krisb added a comment. Tested the whole patchset with various combinations of - opt levels (O0, O2 , O3 , ThinLTO, FullLTO), - debug info options (-fdebug-types-section, -gline-tables-only, -fno-eliminate-un

[PATCH] D127589: [RISCV] Compatible with more RISCV related ld in the test

2022-06-13 Thread Shao-Ce SUN via Phabricator via cfe-commits
sunshaoce updated this revision to Diff 436469. sunshaoce added a comment. Address @StephenFan's comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127589/new/ https://reviews.llvm.org/D127589 Files: clang/test/Driver/riscv64-toolchain.c I

[PATCH] D126479: [Clang] Allow 'Complex float __attribute__((mode(HC)))'

2022-06-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/TargetInfo.h:885 bool useObjCFPRetForRealType(FloatModeKind T) const { +assert(T <= FloatModeKind::Last); return RealTypeUsesObjCFPRet & (1 << (int)T); This will assert if pass

[PATCH] D127647: [clang][lex] NFCI: Use FileEntryRef in ModuleMap::{load,lookup}ModuleMap()

2022-06-13 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:444 FileID ModuleMapID = SrcMgr.getMainFileID(); - const FileEntry *ModuleMap = SrcMgr.getFileEntryForID(ModuleMapID); + Optional ModuleMap = SrcMgr.getFileEntryRefForID(ModuleMapID); ---

[PATCH] D127673: [OpenMP] Fix offload packager not writing to temps correctly

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, yaxunl, tra. Herald added a subscriber: guansong. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang. The

[clang] 6a86730 - Reland [clang][AIX] add option mdefault-visibility-export-mapping

2022-06-13 Thread David Tenty via cfe-commits
Author: David Tenty Date: 2022-06-13T13:43:46-04:00 New Revision: 6a8673038b0c7e20962d732515cd2cd4812f52ef URL: https://github.com/llvm/llvm-project/commit/6a8673038b0c7e20962d732515cd2cd4812f52ef DIFF: https://github.com/llvm/llvm-project/commit/6a8673038b0c7e20962d732515cd2cd4812f52ef.diff L

[clang] 8c974bf - Reland: unbreak Modules/cxx20-export-import.cpp with LLVM_APPEND_VC_REV after 8c8a2679a20f

2022-06-13 Thread David Tenty via cfe-commits
Author: Nico Weber Date: 2022-06-13T13:45:13-04:00 New Revision: 8c974bfe1cb944a760d3b838aec4179577d0c3f5 URL: https://github.com/llvm/llvm-project/commit/8c974bfe1cb944a760d3b838aec4179577d0c3f5 DIFF: https://github.com/llvm/llvm-project/commit/8c974bfe1cb944a760d3b838aec4179577d0c3f5.diff LO

[PATCH] D126984: [clang] Add initial support for gcc's optimize function attribute

2022-06-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D126984#3574550 , @aeubanks wrote: > I can't speak for @xbolva00 but the only part I'm against is the user-visible > feature of > >> - Added preliminary support for GCC's attribute `optimize`, which allows >> functions

[PATCH] D126984: [clang] Add initial support for gcc's optimize function attribute

2022-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> Would that work for you (and you as well @aeubanks)? yes :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126984/new/ https://reviews.llvm.org/D126984 ___ cfe-commits mailin

[PATCH] D127654: [clang] NFCI: Use DirectoryEntryRef in Module::Directory

2022-06-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham accepted this revision. bnbarham added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Basic/Module.h:138 /// are found. - const DirectoryEntry *Directory = nullptr; + OptionalDirectoryEntryRefDegradesToDirectoryEntr

[PATCH] D125723: [MSVC] Add support for MSVC pragma optimize

2022-06-13 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 436476. steplong added a comment. - Parse the string in the pragma - Some of the tests should fail. I'll fix them up once D126984 looks good Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D127654: [clang] NFCI: Use DirectoryEntryRef in Module::Directory

2022-06-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: clang/lib/Lex/ModuleMap.cpp:178 // Search for the header file within the module's home directory. - auto *Directory = M->Directory; + auto Directory = M->Directory; SmallString<128> FullPathName(Directory->getName()); --

[PATCH] D125723: [MSVC] Add support for MSVC pragma optimize

2022-06-13 Thread Stephen Long via Phabricator via cfe-commits
steplong added inline comments. Comment at: clang/include/clang/Sema/Sema.h:768 + /// (i.e. `ModifyFnAttributeMSPragmaOptimze()` does nothing) + bool MSPragmaOptimizeIsOn = true; + This might be confusing. `ModifyFnAttributeMSPragmaOptimize()` adds optnone to

[PATCH] D127660: [clang][lex] NFCI: Use DirectoryEntryRef in Preprocessor::MainFileDir

2022-06-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham accepted this revision. bnbarham added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Frontend/FrontendAction.cpp:507 // be resolved relative to the build directory of the module map file. - CI.getPreprocessor().setMainFileDir

[PATCH] D123064: [Clang][C++23] P2071 Named universal character escapes

2022-06-13 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. In D123064#3575503 , @cor3ntin wrote: > @tstellar I saw you say in another path that you got confirmation from > lawyers that it's okay to include UnicodeData.txt (which this patch doesn't > do) and derived data (which this pat

[PATCH] D112916: Confusable identifiers detection

2022-06-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Subject: Confusable identifiers detection Add `[clang-tidy] ` Comment at: clang-tools-extra/clang-tidy/misc/ConfusableTable/build_confusable_table.cpp:30 + +SmallVector Values; +Line.split(Values, ';'); Place SmallVector out

[PATCH] D126984: [clang] Add initial support for gcc's optimize function attribute

2022-06-13 Thread Stephen Long via Phabricator via cfe-commits
steplong added a comment. >> and even for the MSVC pragma `#pragma optimize("t", on)`, what are we >> supporting if the user compiles their code with `-O0`? because right now we >> won't optimize anything with `-O0` > > @steplong -- what are your thoughts on this? Hmm, I think I'm ok with ignor

[PATCH] D127663: [clang][lex] NFCI: Use DirectoryEntryRef in HeaderSearch::LookupFile

2022-06-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham accepted this revision. bnbarham added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Frontend/FrontendAction.cpp:811 // Relative searches begin from CWD. - const DirectoryEntry *Dir = nullptr; - if (auto DirOrErr

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 436484. hctim marked 4 inline comments as done. hctim added a comment. Final review touch-ups. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 Files: clang/lib/CodeGe

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added inline comments. Comment at: clang/lib/CodeGen/SanitizerMetadata.cpp:101 + llvm::ConstantAsMetadata::get(llvm::ConstantInt::get( + llvm::Type::getInt1Ty(VMContext), Meta.IsDynInit)), llvm::ConstantAsMetadata::get(llvm::ConstantInt::get( --

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 436485. hctim added a comment. Remove one unnecessary set of brackets before submit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 Files: clang/lib/CodeGen/CodeGenM

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips 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 rGe7766972a679: Add sanitizer metadata attributes to clang IR gen. (authored by hctim). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[clang] e776697 - Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips via cfe-commits
Author: Mitch Phillips Date: 2022-06-13T11:19:15-07:00 New Revision: e7766972a6790e25dbb4ce3481f57e9792b49269 URL: https://github.com/llvm/llvm-project/commit/e7766972a6790e25dbb4ce3481f57e9792b49269 DIFF: https://github.com/llvm/llvm-project/commit/e7766972a6790e25dbb4ce3481f57e9792b49269.diff

[PATCH] D125349: [Sema] Fix crash for C11 atomic in gnu++ mode

2022-06-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Minor suggestion for a cleanup, then LGTM. Comment at: clang/lib/Sema/SemaOverload.cpp:9048 +ParamTypes[0] = S.Context.getVolatileType(ParamTypes[0]); + ParamTypes[0] = S.Context.getLValueReferenceType(ParamTypes[0]); +

[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

2022-06-13 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 436487. iains added a comment. rebased. Amended to include a global CTOR entry for each module kind. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126189/new/ https://reviews.llvm.org/D126189 Files: clang/incl

[PATCH] D127663: [clang][lex] NFCI: Use DirectoryEntryRef in HeaderSearch::LookupFile

2022-06-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added a comment. Failing test seems to be because `.` is turned into the full path at some point. It's possible that this is because `getFileRef` returns the absolute path (see the massive FIXME there). If that's the case we could fix that by fixing `clang-apply-replacements` and then

[clang] ee6ad7a - [clang-cl][MSVC] Map /external:Wn n=1-4 to -Wsystem-headers

2022-06-13 Thread Stephen Long via cfe-commits
Author: Stephen Long Date: 2022-06-13T11:26:07-07:00 New Revision: ee6ad7af45a0be36191e0d55f005d9a0dd8005be URL: https://github.com/llvm/llvm-project/commit/ee6ad7af45a0be36191e0d55f005d9a0dd8005be DIFF: https://github.com/llvm/llvm-project/commit/ee6ad7af45a0be36191e0d55f005d9a0dd8005be.diff

[PATCH] D126189: [C++20][Modules] Build module static initializers per P1874R1.

2022-06-13 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. @urnathan - I believe that this now implements the same scheme as you have done for GCC (less any of the optimisations). In particular, we now emit global CTOR entries for module initializers, even though these should really be called explicitly, but as was discussed on th

[PATCH] D127452: [clang-cl][MSVC] Map /external:Wn n=1-4 to -Wsystem-headers

2022-06-13 Thread Stephen Long 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 rGee6ad7af45a0: [clang-cl][MSVC] Map /external:Wn n=1-4 to -Wsystem-headers (authored by steplong). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D127673: [OpenMP] Fix offload packager not writing to temps correctly

2022-06-13 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM overall with a couple of nits. Comment at: clang/lib/Driver/Driver.cpp:5420 +/*CreatePrefixForHost=*/isa(A) || +(!!A->getOffloadingHostActiveKinds() && !At

[PATCH] D127673: [OpenMP] Fix offload packager not writing to temps correctly

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added a comment. Thanks for the review. Comment at: clang/lib/Driver/Driver.cpp:5420 +/*CreatePrefixForHost=*/isa(A) || +(!!A->getOffloadingHostActiveKinds() && !AtTopLevel)); if (isa(JA)) {

[PATCH] D125722: [Attribute] Add clang optsize attribute

2022-06-13 Thread Stephen Long via Phabricator via cfe-commits
steplong abandoned this revision. steplong added a comment. Abandoning in favor of D126984 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125722/new/ https://reviews.llvm.org/D125722 __

[PATCH] D125720: [Attribute] Add clang frame_pointer attribute

2022-06-13 Thread Stephen Long via Phabricator via cfe-commits
steplong abandoned this revision. steplong added a comment. Abandoning in favor of D126984 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125720/new/ https://reviews.llvm.org/D125720 __

[PATCH] D125719: [Attribute] Add attribute NeverOptimizeNone

2022-06-13 Thread Stephen Long via Phabricator via cfe-commits
steplong abandoned this revision. steplong added a comment. Abandoning in favor of D126984 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125719/new/ https://reviews.llvm.org/D125719 __

[PATCH] D127673: [OpenMP] Fix offload packager not writing to temps correctly

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 436493. jhuber6 added a comment. Addressing nits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127673/new/ https://reviews.llvm.org/D127673 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/openmp-offl

[PATCH] D123064: [Clang][C++23] P2071 Named universal character escapes

2022-06-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:3139 Diag(SlashLoc, diag::warn_ucn_not_valid_in_c89); -return 0; +return {}; } aaron.ballman wrote: > FWIW, I think using `llvm::None` instead of `{}` is more clear to read

[PATCH] D127379: [Lex] Keep track of skipped preprocessor blocks and advance the lexer directly if they are revisited

2022-06-13 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added inline comments. Comment at: clang/lib/Lex/PPDirectives.cpp:514 + BeginPtr = PP.CurLexer->getBufferLocation(); + SkipRangePtr = &PP.RecordedSkippedRanges[BeginPtr]; + if (*SkipRangePtr) { benlangmuir wrote: > Storing this pointer is o

[PATCH] D125349: [Sema] Fix crash for C11 atomic in gnu++ mode

2022-06-13 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 modulo the suggestion from @rjmccall, thank you for this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125349/new/ https://r

[PATCH] D105255: [MLIR][OpenMP] Added target data, exit data, and enter data operation definition for MLIR.

2022-06-13 Thread Abid via Phabricator via cfe-commits
abidmalikwaterloo marked 2 inline comments as done. abidmalikwaterloo added inline comments. Comment at: clang/lib/Testing/CMakeLists.txt:6 +=== +>>> [Testing] TestAST, a helper for writing straight-line AST tests # Not add_clang_library: this is not part of clang's publ

[PATCH] D127306: [analyzer] Treat system globals as mutable if they are not const

2022-06-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. Overall looks good to me, it is a step towards having a more faithful representation of the reality. Comment at: clang/lib/StaticAnalyzer/Core/MemRegion.cpp:978 +assert(!Ty.isNull()); +if (Ty.isConstQualified

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this breaks tests on win: http://45.33.8.238/win/60022/step_7.txt Please take a look and revert for now if takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/

[PATCH] D127306: [analyzer] Treat system globals as mutable if they are not const

2022-06-13 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/MemRegion.cpp:978 +assert(!Ty.isNull()); +if (Ty.isConstQualified() && Ty->isArithmeticType()) { // TODO: We could walk the complex types here and see if everything is xazax.

[clang] d4245ed - [clang-cl] Accept /FA[c][s][u], but ignore the arguments

2022-06-13 Thread Stephen Long via cfe-commits
Author: Stephen Long Date: 2022-06-13T12:01:54-07:00 New Revision: d4245ed67ce44188714e6b29a0b45e860619bcf2 URL: https://github.com/llvm/llvm-project/commit/d4245ed67ce44188714e6b29a0b45e860619bcf2 DIFF: https://github.com/llvm/llvm-project/commit/d4245ed67ce44188714e6b29a0b45e860619bcf2.diff

[PATCH] D127519: [clang-cl] Accept /FA[c][s][u], but ignore the arguments

2022-06-13 Thread Stephen Long 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 rGd4245ed67ce4: [clang-cl] Accept /FA[c][s][u], but ignore the arguments (authored by steplong). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D126984: [clang] Add initial support for gcc's optimize function attribute

2022-06-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D126984#3578950 , @steplong wrote: >>> and even for the MSVC pragma `#pragma optimize("t", on)`, what are we >>> supporting if the user compiles their code with `-O0`? because right now we >>> won't optimize anything wi

[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 LAS

[clang] 7cb0bc8 - [clang-format] Handle more cases for RemoveBracesLLVM

2022-06-13 Thread via cfe-commits
Author: owenca Date: 2022-06-13T12:10:35-07:00 New Revision: 7cb0bc8abf6efd7e25b0091a7306de23c3a0f314 URL: https://github.com/llvm/llvm-project/commit/7cb0bc8abf6efd7e25b0091a7306de23c3a0f314 DIFF: https://github.com/llvm/llvm-project/commit/7cb0bc8abf6efd7e25b0091a7306de23c3a0f314.diff LOG: [

[PATCH] D127614: [clang-format] Handle more cases for RemoveBracesLLVM

2022-06-13 Thread Owen Pan 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 rG7cb0bc8abf6e: [clang-format] Handle more cases for RemoveBracesLLVM (authored by owenpan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] 8e1f47b - Revert "Add sanitizer metadata attributes to clang IR gen."

2022-06-13 Thread Mitch Phillips via cfe-commits
Author: Mitch Phillips Date: 2022-06-13T12:11:13-07:00 New Revision: 8e1f47b596b28fbc88cf32e8f46eb2fecb145fb2 URL: https://github.com/llvm/llvm-project/commit/8e1f47b596b28fbc88cf32e8f46eb2fecb145fb2 DIFF: https://github.com/llvm/llvm-project/commit/8e1f47b596b28fbc88cf32e8f46eb2fecb145fb2.diff

[PATCH] D127306: [analyzer] Treat system globals as mutable if they are not const

2022-06-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/MemRegion.cpp:978 +assert(!Ty.isNull()); +if (Ty.isConstQualified() && Ty->isArithmeticType()) { // TODO: We could walk the complex types here and see if everything is steak

[PATCH] D127486: [analyzer][NFC] Inline AnalyzerOptions::getUserMode()

2022-06-13 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:362-364 - /// Retrieves and sets the UserMode. This is a high-level option, - /// which is used to set other low-level options. It is not accessible - /// outside of AnalyzerO

[clang] 0539b45 - [analyzer][NFC] Remove unused Analyses enum

2022-06-13 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2022-06-13T21:19:55+02:00 New Revision: 0539b456b7889f9958c07a3c85f9e87bb227c355 URL: https://github.com/llvm/llvm-project/commit/0539b456b7889f9958c07a3c85f9e87bb227c355 DIFF: https://github.com/llvm/llvm-project/commit/0539b456b7889f9958c07a3c85f9e87bb227c355.diff

[PATCH] D127485: [analyzer][NFC] Remove unused Analyses enum

2022-06-13 Thread Balázs Benics 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 rG0539b456b788: [analyzer][NFC] Remove unused Analyses enum (authored by steakhal). Changed prior to commit: https://reviews.llvm.org/D127485?vs=435

[PATCH] D127638: [clang][sema] Provide better diagnostic for missing template parameters

2022-06-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > Note that the call to isTemplateName() is basically copied from > DiagnoseUnknownTypeName() in SemaDecl.cpp. However, just calling that from > SemaCXXScopeSpec.cpp as well makes the SemaObjCXX/property-dot-error.mm test > fail, because it now outputs > clang/tes

[PATCH] D127683: Adds a warning for aligned new in MSVC before C++17

2022-06-13 Thread Luke Nihlen via Phabricator via cfe-commits
luken-google created this revision. Herald added a project: All. luken-google requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. MSVC requires C++17 to support aligned new and defining the macro __cpp_aligned_new. Clang does not, which could r

[clang] 77475ff - Reland "Add sanitizer metadata attributes to clang IR gen."

2022-06-13 Thread Mitch Phillips via cfe-commits
Author: Mitch Phillips Date: 2022-06-13T12:23:27-07:00 New Revision: 77475ffd22418ca7249f5457dddba15ab7cda0cc URL: https://github.com/llvm/llvm-project/commit/77475ffd22418ca7249f5457dddba15ab7cda0cc DIFF: https://github.com/llvm/llvm-project/commit/77475ffd22418ca7249f5457dddba15ab7cda0cc.diff

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. Thanks for the heads up. Reverted, and now re-landing. Unfortunately I don't have a Windows machine so I've made my best guesses about fixing (mostly seems to just symbol name mangling / global attributes that change on the windows target). I'll keep an eye on that specif

[PATCH] D123064: [Clang][C++23] P2071 Named universal character escapes

2022-06-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: llvm/lib/Support/UnicodeNameToCodepoint.cpp:49 +std::string s; +s.reserve(64); +auto n = this; aaron.ballman wrote: > aaron.ballman wrote: > > Any particular reason for 64? > Still wondering why 64 bytes spe

[PATCH] D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator

2022-06-13 Thread Javier Alvarez via Phabricator via cfe-commits
Javier-varez updated this revision to Diff 436516. Javier-varez added a comment. - Preseve ABI when clang is invoked with -fclang-abi-compat <= 14. - Add test for defect report in `clang/test/CXX/drs/dr21xx.cpp`. - Refactor ConstArg to remove if condition. Repository: rG LLVM Github Monorepo

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-06-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I really only had one salient question (and a tiny nit), so I think this is almost good to go. Comment at: clang/include/clang/Basic/AttrDocs.td:6501 + +The attribute does not have any effect on the semantics of C++ code, neither +type checking r

[PATCH] D127647: [clang][lex] NFCI: Use FileEntryRef in ModuleMap::{load,lookup}ModuleMap()

2022-06-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added a comment. The failure here is likely due to the hack in FileManager::getFileRef: // FIXME: This hack ensures that `getDir()` will use the path that was // used to lookup this file, even if we found a file by different path // first. This is required in order to find a module

[PATCH] D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator

2022-06-13 Thread Javier Alvarez via Phabricator via cfe-commits
Javier-varez added a comment. Thanks for the review! Indeed this looks like it implements the defect report dr2171. I didn't realize there was a defect report about this, thanks for bringing it up. I am not sure If this behavior should also change for move constructors, but clang currently cann

[PATCH] D123064: [Clang][C++23] P2071 Named universal character escapes

2022-06-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: llvm/lib/Support/UnicodeNameToCodepoint.cpp:49 +std::string s; +s.reserve(64); +auto n = this; cor3ntin wrote: > aaron.ballman wrote: > > aaron.ballman wrote: > > > Any particular reason for 64? > > Sti

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-13 Thread Guillaume Gomez via Phabricator via cfe-commits
GuillaumeGomez updated this revision to Diff 436525. GuillaumeGomez added a comment. Fix libcxxabi mangling test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127460/new/ https://reviews.llvm.org/D127460 Files: libcxxabi/test/test_demangle.pass.

[PATCH] D127684: [NFC] Use `https` instead of `http` in the urls

2022-06-13 Thread Shao-Ce SUN via Phabricator via cfe-commits
sunshaoce created this revision. Herald added subscribers: libc-commits, libcxx-commits, jsji, Enna1, bzcheeseman, kosarev, jsilvanus, mattd, gchakrabarti, hsmhsm, ThomasRaoux, pmatos, asb, ayermolo, awarzynski, sdasgup3, asavonic, carlosgalvezp, jeroen.dobbelaere, abrachet, wenzhicui, wrengr, C

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. The reland broke fewer tests, but it still broke tests: http://45.33.8.238/win/60026/step_7.txt If you update the patch on here, the presubmit bot should also run windows tests, so you don't have to break main to find out if the patch works. Repository: rG LLVM Githu

[PATCH] D127684: [NFC] Use `https` instead of `http` in the urls

2022-06-13 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. Could you do this on a per-project basis? More than 1000 files is way to much to sift through. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127684/new/ https://reviews.llvm.org/D127684 ___

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-13 Thread Guillaume Gomez via Phabricator via cfe-commits
GuillaumeGomez updated this revision to Diff 436527. GuillaumeGomez added a comment. Fix libcxxabi mangling test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127460/new/ https://reviews.llvm.org/D127460 Files: clang/lib/CodeGen/CGBuiltin.cpp

[PATCH] D127685: [clang-format] Never analyze insert/remove braces in the same pass

2022-06-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: curdeius, HazardyKnusperkeks, MyDeveloperDay. 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. Turn off `Remo

[PATCH] D127460: Rename GCCBuiltin into ClangBuiltin

2022-06-13 Thread Guillaume Gomez via Phabricator via cfe-commits
GuillaumeGomez added 1 blocking reviewer(s): libc++abi. GuillaumeGomez added a comment. I finally took time to fix the failing test. For some reason, I can't seem to push without marking `libcxxabi/test/test_demangle.pass.cpp` as a binary file with `arc diff HEAD~2 --update D127460`. I hope thi

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, tianshilei1992, tra, yaxunl, saiislam. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang. The target fe

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

2022-06-13 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. Herald added a subscriber: StephenFan. LGTM. Added some clang-tidy reviewers. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112916/new/ https://reviews.llvm.org/D112916 ___

[PATCH] D119051: Extend the C++03 definition of POD to include defaulted functions

2022-06-13 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119051/new/ https://reviews.llvm.org/D119051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator

2022-06-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. This is great, thanks for the changes! I added two follow-up inline comments. Another two other small details: Please add documentation about this to LangOptions.h (We try to document there the changes for each ABI version), and please add a release note about this

[PATCH] D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator

2022-06-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. I don't think the OpenMP tests are failing because of this PR, they are a bit flaky sometimes. @erichkeane - Since we haven't branched clang15 yet, I think it's Ok not to add the Ver15 value to the ABI options? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D126061: [clang] Reject non-declaration C++11 attributes on declarations

2022-06-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. This is a bold direction but I like it a lot. Over to @aaron.ballman for final approval. Comment at: clang/lib/Sema/ParsedAttr.cpp:228 + switch (getParsedKind()) { + case

[PATCH] D127593: [clang] Fix trivially copyable for copy constructor and copy assignment operator

2022-06-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D127593#3579518 , @royjacobson wrote: > I don't think the OpenMP tests are failing because of this PR, they are a bit > flaky sometimes. > > @erichkeane - Since we haven't branched clang15 yet, I think it's Ok not to > ad

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Ping – windows bots are still red. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D127690: [NFC] clang/Parser: remove dead code

2022-06-13 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added a project: All. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: Matheus Izvekov Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D127690 Files: clang/

[PATCH] D126479: [Clang] Allow 'Complex float __attribute__((mode(HC)))'

2022-06-13 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/include/clang/Basic/TargetInfo.h:885 bool useObjCFPRetForRealType(FloatModeKind T) const { +assert(T <= FloatModeKind::Last); return RealTypeUsesObjCFPRet & (1 << (int)T); aaron.ballman wrote: > Thi

[PATCH] D126984: [clang] Add initial support for gcc's optimize function attribute

2022-06-13 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 436551. steplong added a comment. - Remove -Og, and all non-zero optimization levels - Fix up docs - Modified tests to reflect -Og and non-zero opt level change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126

<    1   2   3   >