[PATCH] D157146: [Clang][Docs] Consolidate option hiding in ClangOptionDocEmitter

2023-08-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The diff is preferable:) --- tools/clang/docs/html/ClangCommandLineReference.html2023-08-12 22:10:23.876913374 -0700 +++ tools/clang/docs/html/ClangCommandLineReference.html.old2023-08-12 22:09:58.900516809 -0700 @@ -94,8 +94,18 @@ Static analyzer

[PATCH] D157146: [Clang][Docs] Consolidate option hiding in ClangOptionDocEmitter

2023-08-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/utils/TableGen/ClangOptionDocEmitter.cpp:43 +bool hasFlag(const Record *Option, StringRef OptionFlag) { + for (const Record *Flag :

[PATCH] D155290: [PGO] Use Unique Profile Files when New Processes are Forked

2023-08-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Actually, I am not sure changing `%p` to create multiple raw profile files should be the default. Currently, thanks to online profile merging we get just one raw profile file (though counters before fork may be doubly incremented). Using `%p` should not magically

[PATCH] D155290: [PGO] Use Unique Profile Files when New Processes are Forked

2023-08-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D155290#4576643 , @qiongsiwu1 wrote: > In D155290#4574797 , @MaskRay wrote: > >> In D155290#4572965 , @qiongsiwu1 >> wrote: >> >>> Ping for

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:431-436 +if (Expr.isInvalid()) { + SawError = true; + break; +} else { + Exprs.push_back(Expr.get()); +} cor3ntin wrote: > aaron.ballman wrote: > >

[PATCH] D157794: [Driver] Make /Zi and /Z7 aliases of -g rather than handling them specially

2023-08-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: smeenai. rnk added inline comments. Comment at: clang/test/Driver/cl-options.c:567 -// This test was super sneaky: "/Z7" means "line-tables", but "-gdwarf" occurs -// later on the command line, so it should win. Interestingly the cc1 arguments -// came

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D155610#4575579 , @cor3ntin wrote: > @hubert.reinterpretcast It does not, Unicode characters are only escaped in > Diagnostics.cpp, and I think this is what we want. Thanks @cor3ntin for the insight. I agree

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16899 + uint32_t CodePoint = static_cast(V.getInt().getZExtValue()); + PrintCharLiteralPrefix(BTy->getKind(), OS); + OS << '\''; cor3ntin wrote:

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-08-12 Thread Fred Fu via Phabricator via cfe-commits
capfredf added inline comments. Comment at: clang/include/clang/Frontend/ASTUnit.h:901 +SmallVectorImpl , +std::function AfterBeginSourceFile = [](CompilerInstance& CI) -> void {}); @v.g.vassilev Not sure if this is

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-08-12 Thread Fred Fu via Phabricator via cfe-commits
capfredf updated this revision to Diff 549658. capfredf added a comment. use ASTUnit::codeComplete Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154382/new/ https://reviews.llvm.org/D154382 Files: clang/include/clang/Frontend/ASTUnit.h

[PATCH] D157795: [clang] Add missing field to SectionAttr json AST dump

2023-08-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: aaron.ballman. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D157783: [clang] Add rmissing fields to DeprecatedAttr and UnavailableAttr json AST dump

2023-08-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 549645. serge-sans-paille added a comment. + test case CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157783/new/ https://reviews.llvm.org/D157783 Files: clang/include/clang/AST/JSONNodeDumper.h clang/lib/AST/JSONNodeDumper.cpp

[PATCH] D157197: [clang][CodeGen][OpenMP] Fix if-clause for 'target teams loop'

2023-08-12 Thread David Pagan via Phabricator via cfe-commits
ddpagan added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1570-1575 + // If we are here with a 'target teams loop' then we are emitting the + // 'parallel' region of the 'target teams distribute parallel for' + // emitted in place of the 'target teams

[PATCH] D157197: [clang][CodeGen][OpenMP] Fix if-clause for 'target teams loop'

2023-08-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1570-1575 + // If we are here with a 'target teams loop' then we are emitting the + // 'parallel' region of the 'target teams distribute parallel for' + // emitted in place of the 'target teams

[PATCH] D157197: [clang][CodeGen][OpenMP] Fix if-clause for 'target teams loop'

2023-08-12 Thread David Pagan via Phabricator via cfe-commits
ddpagan added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1570-1575 + // If we are here with a 'target teams loop' then we are emitting the + // 'parallel' region of the 'target teams distribute parallel for' + // emitted in place of the 'target teams

[PATCH] D157197: [clang][CodeGen][OpenMP] Fix if-clause for 'target teams loop'

2023-08-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1570-1575 + // If we are here with a 'target teams loop' then we are emitting the + // 'parallel' region of the 'target teams distribute parallel for' + // emitted in place of the 'target teams

[PATCH] D157783: [clang] Add rmissing fields to DeprecatedAttr and UnavailableAttr json AST dump

2023-08-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 549644. serge-sans-paille retitled this revision from "[clang] Add reason and replacement fields to DeprecatedAttr json AST dump" to "[clang] Add rmissing fields to DeprecatedAttr and UnavailableAttr json AST dump". serge-sans-paille added a

[PATCH] D157794: [Driver] Make /Zi and /Z7 aliases of -g rather than handling them specially

2023-08-12 Thread Justin Bogner via Phabricator via cfe-commits
bogner created this revision. bogner added reviewers: rnk, jansvoboda11, MaskRay. Herald added subscribers: jeroen.dobbelaere, mcrosier. Herald added a project: All. bogner requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The -g flag has

[PATCH] D157151: [Driver] Refactor to use llvm Option's new Visibility flags

2023-08-12 Thread Justin Bogner via Phabricator via cfe-commits
bogner added a comment. In D157151#4582109 , @awarzynski wrote: > I think that it would be good to replace `Default` with e.g. > > - `Clang`, or > - `ClangDriver`, or > - `ClangCompilerDriver`. > > Or, at least, to make the meaning of `Default` much

[PATCH] D157793: [Headers] Add missing __need_ macros to stdarg.h

2023-08-12 Thread Ian Anderson via Phabricator via cfe-commits
iana created this revision. iana added reviewers: zatrazz, jfb, MaskRay, eli.friedman, aaron.ballman, rsmith, steplong, efriedma, jyknight, erichkeane. Herald added a subscriber: ributzka. Herald added a project: All. iana requested review of this revision. Herald added a project: clang. Herald

[PATCH] D157651: [RISCV] Rewrite CheckInvalidVLENandLMUL to avoid floating point.

2023-08-12 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 rGee6befe26437: [RISCV] Rewrite CheckInvalidVLENandLMUL to avoid floating point. (authored by craig.topper). Changed prior to commit:

[clang] ee6befe - [RISCV] Rewrite CheckInvalidVLENandLMUL to avoid floating point.

2023-08-12 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-08-12T11:14:51-07:00 New Revision: ee6befe26437034be84bf4785127b397afb9dfcb URL: https://github.com/llvm/llvm-project/commit/ee6befe26437034be84bf4785127b397afb9dfcb DIFF: https://github.com/llvm/llvm-project/commit/ee6befe26437034be84bf4785127b397afb9dfcb.diff

[PATCH] D157651: [RISCV] Rewrite CheckInvalidVLENandLMUL to avoid floating point.

2023-08-12 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 549634. craig.topper added a comment. Revise coment, rename variable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157651/new/ https://reviews.llvm.org/D157651 Files: clang/lib/Sema/SemaChecking.cpp

[PATCH] D157474: [RISCV] Add missing Xsfvcp extension check in clang sema

2023-08-12 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/D157474/new/ https://reviews.llvm.org/D157474

[PATCH] D157693: [clang][doc] Mark _Float16 is support natively when Zfh is available

2023-08-12 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/docs/LanguageExtensions.rst:815 * X86 (if SSE2 is available; natively if AVX512-FP16 is also available) + * RISC-V (natively if Zfh is available) Zhinx also Repository: rG LLVM Github Monorepo

[PATCH] D157197: [clang][CodeGen][OpenMP] Fix if-clause for 'target teams loop'

2023-08-12 Thread David Pagan via Phabricator via cfe-commits
ddpagan added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1570-1575 + // If we are here with a 'target teams loop' then we are emitting the + // 'parallel' region of the 'target teams distribute parallel for' + // emitted in place of the 'target teams

[PATCH] D157773: [clang-tidy] fix None tmpdir when exporting fixes in run-clang-tidy

2023-08-12 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc3da99275a52: [clang-tidy] fix None tmpdir when exporting fixes in run-clang-tidy (authored by 5chmidti, committed by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] c3da992 - [clang-tidy] fix None tmpdir when exporting fixes in run-clang-tidy

2023-08-12 Thread Piotr Zegar via cfe-commits
Author: Julian Schmidt Date: 2023-08-12T16:18:33Z New Revision: c3da99275a520b73235d975017502876e07e3e8e URL: https://github.com/llvm/llvm-project/commit/c3da99275a520b73235d975017502876e07e3e8e DIFF: https://github.com/llvm/llvm-project/commit/c3da99275a520b73235d975017502876e07e3e8e.diff

[PATCH] D157497: feat: Migrate isArch16Bit

2023-08-12 Thread Evgeniy Makarev via Phabricator via cfe-commits
Pivnoy updated this revision to Diff 549621. Pivnoy added a comment. Fix some format mistake Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157497/new/ https://reviews.llvm.org/D157497 Files: clang/lib/Frontend/CompilerInvocation.cpp

[PATCH] D157497: feat: Migrate isArch16Bit

2023-08-12 Thread Evgeniy Makarev via Phabricator via cfe-commits
Pivnoy updated this revision to Diff 549620. Pivnoy added a comment. Add deprecated attribute Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157497/new/ https://reviews.llvm.org/D157497 Files: clang/lib/Frontend/CompilerInvocation.cpp

[PATCH] D157786: Add isArch32Bit into TripleUtils

2023-08-12 Thread Evgeniy Makarev via Phabricator via cfe-commits
Pivnoy created this revision. Herald added subscribers: luke, pmatos, asb, frasercrmck, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar,

[PATCH] D155290: [PGO] Use Unique Profile Files when New Processes are Forked

2023-08-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/profile/InstrProfilingFile.c:94 static lprofFilename lprofCurFilename = {0, 0, 0, {0}, NULL, {0}, 0, 0, 0, PNS_unknown}; static int ProfileMergeRequested = 0;

[PATCH] D157783: [clang] Add reason and replacement fields to DeprecatedAttr json AST dump

2023-08-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: aaron.ballman. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D156320: [Flang][Driver] Add support for Rpass and related options

2023-08-12 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thanks for trimming this, it's much easier to review! A few more suggestions, but nothing major. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:227-263 + bool needLocTracking = false; + + if (!opts.OptRecordFile.empty()) +

[clang] 415d9e8 - [ASTMatcher] Fix typos in LibASTMatchersReference.html

2023-08-12 Thread via cfe-commits
Author: dingfei Date: 2023-08-12T21:33:43+08:00 New Revision: 415d9e8ca39c0b42f351cc532ccfb48b6ac97f7f URL: https://github.com/llvm/llvm-project/commit/415d9e8ca39c0b42f351cc532ccfb48b6ac97f7f DIFF: https://github.com/llvm/llvm-project/commit/415d9e8ca39c0b42f351cc532ccfb48b6ac97f7f.diff LOG:

[PATCH] D157781: [clang] Add cleanup_function field to CleanupAttr json AST dump

2023-08-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: aaron.ballman. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D157780: [ASTImporter] Add import of MacroQualifiedType

2023-08-12 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 549609. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157780/new/ https://reviews.llvm.org/D157780 Files: clang/lib/AST/ASTImporter.cpp clang/unittests/AST/ASTImporterTest.cpp Index:

[PATCH] D157151: [Driver] Refactor to use llvm Option's new Visibility flags

2023-08-12 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. I've tested this locally and can confirm that the behavior of `clang` and `flang-new` has been preserved (as in, these changes won't be visible to the end users). Nice! I think that it would be good to replace `Default` with e.g. - `Clang`, or - `ClangDriver`, or -

[PATCH] D157780: [ASTImporter] Add import of MacroQualifiedType

2023-08-12 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. Add import of

[PATCH] D157777: [ASTMatcher] Add matcher for 'MacroQualifiedType'

2023-08-12 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 549607. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D15/new/ https://reviews.llvm.org/D15 Files: clang/docs/LibASTMatchersReference.html clang/docs/ReleaseNotes.rst

[PATCH] D157777: [ASTMatcher] Add matcher for 'MacroQualifiedType'

2023-08-12 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 549605. danix800 added a comment. Herald added a subscriber: martong. Herald added a reviewer: shafik. Add import of MacroQualifiedType. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D15/new/

[PATCH] D157777: [ASTMatcher] Add matcher for 'MacroQualifiedType'

2023-08-12 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. Add matcher for 'MacroQualifiedType' Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D15 Files:

[PATCH] D156910: [clang] Add pragma force_vectorize

2023-08-12 Thread Maksim Kita via Phabricator via cfe-commits
kitaisreal updated this revision to Diff 549600. kitaisreal added a comment. Herald added a subscriber: zzheng. Fixed tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156910/new/ https://reviews.llvm.org/D156910 Files:

[PATCH] D157775: [clang] Add aliasee field to AliasAttr json AST dump

2023-08-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: aaron.ballman. Herald added a subscriber: jeroen.dobbelaere. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.

[PATCH] D157773: [clang-tidy] fix None tmpdir when exporting fixes in run-clang-tidy

2023-08-12 Thread Julian Schmidt via Phabricator via cfe-commits
5chmidti added a comment. Thanks. I don't have commit access, could somebody please commit this for me with `Julian Schmidt <44101708+5chmi...@users.noreply.github.com>`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157773/new/

[PATCH] D157773: [clang-tidy] fix None tmpdir when exporting fixes in run-clang-tidy

2023-08-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL 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/D157773/new/ https://reviews.llvm.org/D157773

[PATCH] D157773: [clang-tidy] fix None tmpdir when exporting fixes in run-clang-tidy

2023-08-12 Thread Julian Schmidt via Phabricator via cfe-commits
5chmidti created this revision. 5chmidti added a project: clang-tools-extra. Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. 5chmidti requested review of this revision. Herald added a subscriber: cfe-commits.

[PATCH] D157747: Support Unicode Microsoft predefined macros

2023-08-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. This does not appear to be valid under MSVC and I don't think we should support features that MS does not (Nor can i find any documentation that it ought to work) https://godbolt.org/z/7Te3YYeb9 Supporting the same concatenation behavior MSVC does have seem like a

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 549584. cor3ntin marked 8 inline comments as done. cor3ntin added a comment. Address Hubert's feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156237/new/ https://reviews.llvm.org/D156237 Files:

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16899 + uint32_t CodePoint = static_cast(V.getInt().getZExtValue()); + PrintCharLiteralPrefix(BTy->getKind(), OS); + OS << '\''; hubert.reinterpretcast wrote: