[PATCH] D133635: [clang-format] Don't insert braces for loops with a null statement

2022-09-09 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: MyDeveloperDay, curdeius, HazardyKnusperkeks. 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. This is a work

[PATCH] D86049: RFC: Implement optional exportable wrapper function generation for objc_direct methods.

2022-09-09 Thread Dave MacLachlan via Phabricator via cfe-commits
dmaclach added a comment. Thanks Puyan! Awesome to see this moving forward. Comment at: clang/test/CodeGenObjC/objc-direct-wrapper.m:30 +#if ENABLE_VISIBLE_OBJC_DIRECT +#define OBJC_DIRECT __attribute((objc_direct)) __attribute__((objc_direct_visible)) +#else

[PATCH] D133589: [clang-format] JSON formatting add new option for controlling newlines in json arrays

2022-09-09 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:4405-4408 if (Left.is(TT_ArrayInitializerLSquare) && Left.is(tok::l_square) && !Right.is(tok::r_square)) { - return true; + if (Right.is(tok::l_brace)) +return true; ---

[PATCH] D133571: [clang-format] Introduce NoFallThrough option into AllowShortCaseLabelsOnASingleLine

2022-09-09 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:567 return Style.AllowShortCaseLabelsOnASingleLine - ? tryMergeShortCaseLabels(I, E, Limit) + ? tryMergeShortCaseLabels(I, E, Limit, PreviousLine, Style)

[PATCH] D86049: RFC: Implement optional exportable wrapper function generation for objc_direct methods.

2022-09-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 459261. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86049/new/ https://reviews.llvm.org/D86049 Files: clang/include/clang/AST/DeclObjC.h clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDoc

[PATCH] D86049: RFC: Implement optional exportable wrapper function generation for objc_direct methods.

2022-09-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked an inline comment as done. plotfi added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2251-2256 +def ObjCDirectVisible : Attr { + let Spellings = [Clang<"objc_direct_visible">]; + let Subjects = SubjectList<[ObjCMethod], ErrorDiag>; + let LangOpt

[PATCH] D86049: RFC: Implement optional exportable wrapper function generation for objc_direct methods.

2022-09-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 459260. plotfi added a comment. Updated to use mangleObjCMethodName in clang/lib/AST/Mangle.cpp to set the `_+` direct method name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86049/new/ https://reviews.llvm.

[PATCH] D133634: [clang] Allow vector of BitInt

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: beanz, pow2clk, Anastasia, aaron.ballman, bogner. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Remove check which disable BitInt as

[PATCH] D133633: [CMake] Add ClangBootstrap configuration

2022-09-09 Thread Amir Ayupov via Phabricator via cfe-commits
Amir created this revision. Amir added reviewers: phosek, MaskRay. Herald added subscribers: StephenFan, mgorny. Herald added a reviewer: alexander-shaposhnikov. Herald added a project: All. Amir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commit

[PATCH] D86049: RFC: Implement optional exportable wrapper function generation for objc_direct methods.

2022-09-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2251-2256 +def ObjCDirectVisible : Attr { + let Spellings = [Clang<"objc_direct_visible">]; + let Subjects = SubjectList<[ObjCMethod], ErrorDiag>; + let LangOpts = [ObjC]; + let Documentation = [ObjCD

[PATCH] D86049: RFC: Implement optional exportable wrapper function generation for objc_direct methods.

2022-09-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 459257. plotfi added a comment. Updated with some of @mwyman's feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86049/new/ https://reviews.llvm.org/D86049 Files: clang/include/clang/AST/DeclObjC.h cl

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 459248. inclyc added a comment. Use RAII object to maintain the Parser state > have you explored making a new DeclSpecContext and modifying > isDefiningTypeSpecifierContext()? I think that would likely be a cleaner > approach. Emm, I've tried passing a Decl

[PATCH] D133613: [clang][cmake] Remove extra brace

2022-09-09 Thread Mohammed Keyvanzadeh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG467bb47c8418: [clang][cmake] Remove extra brace (authored by VoltrexMaster). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133613/new/ https://reviews.llvm.

[clang] 467bb47 - [clang][cmake] Remove extra brace

2022-09-09 Thread Mohammed Keyvanzadeh via cfe-commits
Author: Mohammed Keyvanzadeh Date: 2022-09-10T05:00:23+04:30 New Revision: 467bb47c841897450990f3ab82e79fec5f2d1f60 URL: https://github.com/llvm/llvm-project/commit/467bb47c841897450990f3ab82e79fec5f2d1f60 DIFF: https://github.com/llvm/llvm-project/commit/467bb47c841897450990f3ab82e79fec5f2d1f6

[PATCH] D133622: [clang][test] Disallow using the default module cache path in lit tests

2022-09-09 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Awesome! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133622/new/ https://reviews.llvm.org/D133622 _

[PATCH] D133066: fix a typo in comment of AddConversionCandidate

2022-09-09 Thread zhouyizhou via Phabricator via cfe-commits
zhouyizhou added a comment. In D133066#3780900 , @aaron.ballman wrote: > In D133066#3768091 , @zhouyizhou > wrote: > >> In D133066#3767146 , >> @aaron.ballman wrote: >>

[clang] f4a13c9 - [Clang][ScanDeps] Change multiple-commands.c test to use -fmodules-cache-path on implicit builds

2022-09-09 Thread Bruno Cardoso Lopes via cfe-commits
Author: Bruno Cardoso Lopes Date: 2022-09-09T16:20:04-07:00 New Revision: f4a13c9c0a049d40e0365477c58c2a5369eda6dc URL: https://github.com/llvm/llvm-project/commit/f4a13c9c0a049d40e0365477c58c2a5369eda6dc DIFF: https://github.com/llvm/llvm-project/commit/f4a13c9c0a049d40e0365477c58c2a5369eda6dc

[PATCH] D133617: [Clang][ScanDeps] Change multiple-commands.c test to use -fmodules-cache-path on implicit builds

2022-09-09 Thread Bruno Cardoso Lopes 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 rGf4a13c9c0a04: [Clang][ScanDeps] Change multiple-commands.c test to use -fmodules-cache-path… (authored by bruno). Changed prior to commit: https:/

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D132913#3781611 , @python3kgae wrote: > In D132913#3781591 , @chapuni wrote: > >> The fix looks good. Thanks. >> >>> Is -DLLVM_ENABLE_ASSERTIONS=ON what you mean by -Asserts? >> >>

[PATCH] D133617: [Clang][ScanDeps] Change multiple-commands.c test to use -fmodules-cache-path on implicit builds

2022-09-09 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. Attempting to not do this again: https://reviews.llvm.org/D133622 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133617/new/ https://reviews.llvm.org/D133617 ___ cfe-commits m

[PATCH] D133622: [clang][test] Disallow using the default module cache path in lit tests

2022-09-09 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: bruno, jansvoboda11, arphaman. Herald added a subscriber: delcypher. Herald added a project: All. benlangmuir requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits.

[PATCH] D133617: [Clang][ScanDeps] Change multiple-commands.c test to use -fmodules-cache-path on implicit builds

2022-09-09 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Thanks for the fast review! Good suggestions, will apply and land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133617/new/ https://reviews.llvm.org/D133617 ___ cfe-commits mailin

[PATCH] D133617: [Clang][ScanDeps] Change multiple-commands.c test to use -fmodules-cache-path on implicit builds

2022-09-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. LGTM, thanks! Though we usually put the cache directory into `%t/cache` (aka `DIR/cache` in the JSON file) in other scanner tests, which would allow you to drop the second `sed` expression. (And you'd want to `rm -rf %t` instead.

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D132913#3781591 , @chapuni wrote: > The fix looks good. Thanks. > >> Is -DLLVM_ENABLE_ASSERTIONS=ON what you mean by -Asserts? > > Oh excuse me, "-Asserts" was an ancient term, "w/o assertsions" in the > autoconf age. > An

[PATCH] D133617: [Clang][ScanDeps] Change multiple-commands.c test to use -fmodules-cache-path on implicit builds

2022-09-09 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. Thanks for catching this! Comment at: clang/test/ClangScanDeps/multiple-commands.c:11 // RUN: split-file %s %t -// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.in > %t/cd

[PATCH] D133617: [Clang][ScanDeps] Change multiple-commands.c test to use -fmodules-cache-path on implicit builds

2022-09-09 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: benlangmuir, jansvoboda11, arphaman. Herald added subscribers: hoy, modimo, wenlei. Herald added a project: All. bruno requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The module cache esca

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni added a comment. The fix looks good. Thanks. > Is -DLLVM_ENABLE_ASSERTIONS=ON what you mean by -Asserts? Oh excuse me, "-Asserts" was an ancient term, "w/o assertsions" in the autoconf age. An antonym was "+Asserts". it means `LLVM_ENABLE_ASSERTIONS=ON` Repository: rG LLVM Github Mo

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D132913#3781494 , @chapuni wrote: > The test fails for -Asserts. Fixed the %0 issue in https://github.com/llvm/llvm-project/commit/71fae33f5e7c1b11e32db695fd24dd50aead737c It passed locally on build with -DLLVM_ENABLE_ASS

[PATCH] D132916: [clang] Explicitly set the EmulatedTLS codegen option

2022-09-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM (I think you can call it "NFC" if there's no visible change in community; you don't have to try to account for downstream changes that might interact with it.) Repository: rG LLV

[clang] 71fae33 - [NFC] Cleanup test for D132913 Preserve vec3 for HLSL

2022-09-09 Thread Xiang Li via cfe-commits
Author: Xiang Li Date: 2022-09-09T15:04:59-07:00 New Revision: 71fae33f5e7c1b11e32db695fd24dd50aead737c URL: https://github.com/llvm/llvm-project/commit/71fae33f5e7c1b11e32db695fd24dd50aead737c DIFF: https://github.com/llvm/llvm-project/commit/71fae33f5e7c1b11e32db695fd24dd50aead737c.diff LOG:

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-09-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. That sounds fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132952/new/ https://reviews.llvm.org/D132952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D132186: Clang: Add a new flag Wmisnoinline for printing hot noinline functions

2022-09-09 Thread Archit Saxena via Phabricator via cfe-commits
iamarchit123 added a comment. Hi @modimo @paulkirth any good open source benchmarks where I also can test this? The problem is finding some standard benchmarks which are profiled as well as have standard performance measuring metric to measure improvement. Repository: rG LLVM Github Monorep

[PATCH] D133586: [clang] do not hash undefined qualifiers for FunctionNoProtoType

2022-09-09 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu added a comment. In D133586#3781468 , @rmaz wrote: > In D133586#3781381 , @rtrieu wrote: > >> Do you have a test case for this? > > Was struggling to think of a good one. How about a test that repeatedly >

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-09-09 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 459205. ayzhao added a comment. Fix typename-specifier-3.cpp test Things done: - the warning should also include a check that C++20 is required - the warning should only show up for precxx17, as %std_cxx17- translates to -std=c++2b Repository: rG LLVM Gi

[PATCH] D133157: Add -fsanitizer-coverage=control-flow

2022-09-09 Thread Navid Emamdoost via Phabricator via cfe-commits
Navidem added inline comments. Comment at: clang/lib/Driver/SanitizerArgs.cpp:814 (CoverageTracePC | CoverageTracePCGuard | CoverageInline8bitCounters | - CoverageInlineBoolFlag)) + CoverageInlineBoolFlag | CoverageControlFlow)) CoverageFeatures |=

[PATCH] D133157: Add -fsanitizer-coverage=control-flow

2022-09-09 Thread Navid Emamdoost via Phabricator via cfe-commits
Navidem updated this revision to Diff 459201. Navidem added a comment. Bring back the runtime test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133157/new/ https://reviews.llvm.org/D133157 Files: clang/docs/SanitizerCoverage.rst clang/includ

[PATCH] D133157: Add -fsanitizer-coverage=control-flow

2022-09-09 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/docs/SanitizerCoverage.rst:382 + void __sanitizer_cov_cfs_init(const uintptr_t *cfs_beg, +const uintptr_t *cfs_end) { +// [cfs_beg,cfs_end) is the array of ptr-sized integers representing ---

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/CodeGenHLSL/float3.hlsl:4 +// Make sure float3 is not changed into float4. +// CHECK:<3 x float> @"?foo@@YAT?$__vector@M$02@__clang@@T12@@Z"(<3 x float> noundef %a) +// CHECK:%[[A_ADDR:.+]] = alloca <3 x float>, align 16

[PATCH] D133157: Add -fsanitizer-coverage=control-flow

2022-09-09 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. we need to update llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_coverage_interface.inc llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_interface_internal.h you can search by __sanitizer_cov_8bit_counters_init if anything missing Something like Single

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni added a comment. The test fails for -Asserts. Comment at: clang/test/CodeGenHLSL/float3.hlsl:4 +// Make sure float3 is not changed into float4. +// CHECK:<3 x float> @"?foo@@YAT?$__vector@M$02@__clang@@T12@@Z"(<3 x float> noundef %a) +// CHECK:%[[A_ADDR:.+]] = alloca <

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-09-09 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D130867#3781429 , @cjdb wrote: > I had not realised that libc++ was listed as a reviewer. The change does have an impact on libc++, so I think it makes sense to look at it not only from the compiler perspective, but from the

[PATCH] D133157: Add -fsanitizer-coverage=control-flow

2022-09-09 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/docs/SanitizerCoverage.rst:382 + void __sanitizer_cov_cfs_init(const uintptr_t *cfs_beg, +const uintptr_t *cfs_end) { +// [cfs_beg,cfs_end) is the array of ptr-sized integers representing ---

[PATCH] D133609: [Sema] compat warning of using deduced type in non-type template parameter

2022-09-09 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:1535-1545 +if (TInfo->getType()->getContainedAutoType()) { + // template + Diag(D.getIdentifierLoc(), + diag::warn_cxx14_compat_template_nontype_parm_auto_type) + << QualT

[PATCH] D133586: [clang] do not hash undefined qualifiers for FunctionNoProtoType

2022-09-09 Thread Richard Howell via Phabricator via cfe-commits
rmaz added a comment. In D133586#3781381 , @rtrieu wrote: > Do you have a test case for this? Was struggling to think of a good one. How about a test that repeatedly generates a pcm for a func decl with no params and checks if the DECL_FUNCTION record

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-09-09 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb abandoned this revision. cjdb added a comment. I had not realised that libc++ was listed as a reviewer. I am going to abandon this revision, since I only wish to interact with that community when it is both business-critical and unavoidable. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D133611: [clang] sort additional module maps when serializing

2022-09-09 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. Good catch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133611/new/ https://reviews.llvm.org/D133611 __

[PATCH] D133570: Clang codegen, fixes issue with emitting partially initialized constant arrays larger than 2^32

2022-09-09 Thread Ofek Shochat via Phabricator via cfe-commits
OfekShochat added a comment. Yeah. But it's really not clear how it does that, as it gets all the functions from the generated file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133570/new/ https://reviews.llvm.org/D133570 ___

[PATCH] D133570: Clang codegen, fixes issue with emitting partially initialized constant arrays larger than 2^32

2022-09-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. FYI, the "Visit" method comes from the base class StmtVisitor; it just forwards to the relevant method. (For example, if you call "Visit" with an InitListExpr, it calls VisitInitListExpr.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D133589: [clang-format] JSON formatting add new option for controlling newlines in json arrays

2022-09-09 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3115 +**JsonMultilineArrays** (``Boolean``) :versionbadge:`clang-format 16` + If ``true``, clang-format will always break after a Json array `[` Why limiting to JSON only? Could

[PATCH] D133613: [clang][cmake] Remove extra brace

2022-09-09 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek 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/D133613/new/ https://reviews.llvm.org/D133613 ___

[PATCH] D133586: [clang] do not hash undefined qualifiers for FunctionNoProtoType

2022-09-09 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu added a comment. Do you have a test case for this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133586/new/ https://reviews.llvm.org/D133586 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D133571: [clang-format] Introduce NoFallThrough option into AllowShortCaseLabelsOnASingleLine

2022-09-09 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM after fixing the last comment. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:650 + // Don't merge if the last thing on the line before was an attribut

[PATCH] D133613: [clang][cmake] Remove extra brace

2022-09-09 Thread Mohammed Keyvanzadeh via Phabricator via cfe-commits
VoltrexMaster created this revision. VoltrexMaster added reviewers: phosek, Ericson2314. Herald added a subscriber: mgorny. Herald added a project: All. VoltrexMaster requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Remove the extra trailing

[PATCH] D133611: [clang] sort additional module maps when serializing

2022-09-09 Thread Richard Howell via Phabricator via cfe-commits
rmaz created this revision. Herald added a subscriber: mgrang. Herald added a project: All. rmaz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Sort additional module maps when serializing pcm files. This ensures the `MODULE_MAP_FILE` reco

[PATCH] D133609: [Sema] compat warning of using deduced type in non-type template parameter

2022-09-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/test/SemaCXX/template-nontype-args-compat.cpp:1 +// RUN: %clang_cc1 -fsyntax-only -Wpre-c++20-compat -std=c++20 -verify=cpp20 %s + I cannot find other tests of compatibility warnings though. Is it necessary to ad

[PATCH] D133518: [HLSL] Call global destructors from entries

2022-09-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D133518#3781101 , @aaron.ballman wrote: > This generally LGTM, but to double-check: the behavior if the user does call > `atexit()` or or `at_quick_exit()` is that we simply don't call those > handlers? As opposed to something

[PATCH] D133609: [Sema] compat warning of using deduced type in non-type template parameter

2022-09-09 Thread YingChi Long via Phabricator via cfe-commits
inclyc created this revision. Herald added a subscriber: kristof.beyls. Herald added a project: All. inclyc added reviewers: aaron.ballman, mizvekov, clang-language-wg. inclyc published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. Seems we are mi

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 459175. Codesbyusman added a comment. updated, I am not getting why this is happening but in the .cpp test file without Wvla all is working and is detecting by default as you are saying but when I use vla-warning/note it gives me error that "warning see

[PATCH] D133354: [Clang]: Diagnose deprecated copy operations also in MSVC compatibility mode

2022-09-09 Thread Julius via Phabricator via cfe-commits
ningvin added a comment. That is indeed a better option than to simply copy the test case. I did some more digging and found the following test cases which reference the deprecated copy warning (all located under clang/test/CXX/): - deprecated.cpp

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:3 // RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify=expected,cxx11_20,cxx20_2b -triple x86_64-linux -Wno-string-plus-int -Wno-pointer-arith -Wno-zero-length-array -Wno-c99-desig

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman marked an inline comment as done. Codesbyusman added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:3 // RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify=expected,cxx11_20,cxx20_2b -triple x86_64-linux -Wno-string-plus-int -Wno-pointe

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Sema/cast.c:1-5 +// RUN: %clang_cc1 -fsyntax-only -triple x86_64-unknown-unknown %s -verify -Wvla + +int array[(long)(char *)0]; // expected-warning {{variable length array used}} \ +// expe

[PATCH] D132916: [clang] Explicitly set the EmulatedTLS codegen option

2022-09-09 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D132916#3781108 , @aaron.ballman wrote: > In D132916#3773791 , @mstorsjo > wrote: > >> @efriedma Does this look like what you had in mind; does it seem reasonable >> to @aaron.ballm

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! This approach can work (though I would recommend using an RAII object akin to `InMessageExpressionRAIIObject`), but have you explored making a new `DeclSpecContext` and modifying `isDefiningTypeSpecifierContext()`? I think that would

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman marked 4 inline comments as done. Codesbyusman added inline comments. Comment at: clang/test/Sema/cast.c:1-5 +// RUN: %clang_cc1 -fsyntax-only -triple x86_64-unknown-unknown %s -verify -Wvla + +int array[(long)(char *)0]; // expected-warning {{variable length array

[PATCH] D133354: [Clang]: Diagnose deprecated copy operations also in MSVC compatibility mode

2022-09-09 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/test/SemaCXX/deprecated-copy-msvc.cpp:1 +// RUN: %clang_cc1 %s -std=c++11 %s -Wdeprecated-copy -verify -fms-compatibility + Can we just add a RUN line with -fms-compatibility to clang/test/SemaCXX/deprecated-copy.cp

[PATCH] D132916: [clang] Explicitly set the EmulatedTLS codegen option

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D132916#3773791 , @mstorsjo wrote: > @efriedma Does this look like what you had in mind; does it seem reasonable > to @aaron.ballman? This seems reasonable to me, but I leave it to @efriedma and @rjmccall for the final

[PATCH] D133518: [HLSL] Call global destructors from entries

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This generally LGTM, but to double-check: the behavior if the user does call `atexit()` or or `at_quick_exit()` is that we simply don't call those handlers? As opposed to something worse like we dispatch to the handler and then crash on exit or something like that

[PATCH] D133157: Add -fsanitizer-coverage=control-flow

2022-09-09 Thread Navid Emamdoost via Phabricator via cfe-commits
Navidem marked an inline comment as done and an inline comment as not done. Navidem added inline comments. Comment at: clang/lib/Driver/SanitizerArgs.cpp:807 << "-fsanitize-coverage=[func|bb|edge]" -<< "-fsanitize-coverage=[func|bb|edge],[trace-pc-guard|trace-pc]

[PATCH] D133157: Add -fsanitizer-coverage=control-flow

2022-09-09 Thread Navid Emamdoost via Phabricator via cfe-commits
Navidem updated this revision to Diff 459157. Navidem added a comment. Update doc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133157/new/ https://reviews.llvm.org/D133157 Files: clang/docs/SanitizerCoverage.rst clang/include/clang/Basic/Code

[PATCH] D128958: Add assembler plumbing for sanitize_memtag

2022-09-09 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:713 + if (GV->hasSanitizerMetadata() && GV->isTagged()) { +Triple T = TM.getTargetTriple(); isTagged() already includes a check for hasSanitizerMetadata() Repository:

[PATCH] D133392: [MTE] Add AArch64GlobalsTagging Pass

2022-09-09 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. Change description says that the new pass "marks them as tagged". That's not what is happening. Comment at: llvm/lib/CodeGen/GlobalMerge.cpp:657 +// Tagged global variables shouldn't be merged, as they are assigned unique +// memory tags at run

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:1036 +// Only add HLSLSema when not in MultiSource. +if (!MultiSource->HasSource()) + MultiSource->AddSource(HLSLSema.get())

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 459149. python3kgae added a comment. Remove useless code since ExternalSource is not be reused when there're more than one Input files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://rev

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:7476-7483 +CCEDiag(E, diag::note_constexpr_invalid_cast) +<< 0 << Info.Ctx.getLangOpts().CPlusPlus; return static_cast(this)->VisitCastExpr(E); } bool VisitCXXDynamicCastExpr(co

[PATCH] D133066: fix a typo in comment of AddConversionCandidate

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133066#3768091 , @zhouyizhou wrote: > In D133066#3767146 , @aaron.ballman > wrote: > >> In D133066#3765503 , @zhouyizhou >> wrote: >>

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

2022-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D131465#3780833 , @AaronLiu wrote: > In D131465#3780767 , @aaron.ballman > wrote: > >> In D131465#3780717 , @AaronLiu >> wrote: >> >>> This c

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 459134. Codesbyusman added a comment. updating test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133194/new/ https://reviews.llvm.org/D133194 Files: clang/include/clang/Basic/DiagnosticASTKinds.td cl

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a reviewer: aaron.ballman. beanz added a subscriber: aaron.ballman. beanz added a comment. Looping @aaron.ballman in here too. I think we need some eyes from outside our team on this before landing it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D133587: Loop names used in reporting can grow very large

2022-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133587/new/ https://reviews.llvm.org/D133587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman added inline comments. Comment at: clang/test/Sema/cast.c:2 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-unknown-unknown %s -verify +// RUN: %clang_cc1 -std=c99 -fsyntax-only -DConstantCast -Wvla -verify %s + aaron.ballman wrote: > Instead of ad

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:1036 +// Only add HLSLSema when not in MultiSource. +if (!MultiSource->HasSource()) + MultiSource->AddSource(HLSLSema.get()); This seems off. The multi source

[PATCH] D132952: [Sema] disable -Wvla for function array parameters

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D132952#3773469 , @inclyc wrote: >> Yeah, that's a different way of delineating than I was thinking originally >> and it's worth more thought. I was thinking the separation would be "this is >> a VLA" (for people who wa

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

2022-09-09 Thread Aaron H Liu via Phabricator via cfe-commits
AaronLiu added a comment. In D131465#3780767 , @aaron.ballman wrote: > In D131465#3780717 , @AaronLiu > wrote: > >> This cause a large amount failures in our testing with errors such as: >> >> error: ISO C++17

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. python3kgae marked an inline comment as done. Closed by commit rGc9d2b6b92d6c: [HLSL] Preserve vec3 for HLSL. (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[clang] c9d2b6b - [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Xiang Li via cfe-commits
Author: Xiang Li Date: 2022-09-09T10:55:45-07:00 New Revision: c9d2b6b92d6c29d00f6adc0527cf2331dbaae31a URL: https://github.com/llvm/llvm-project/commit/c9d2b6b92d6c29d00f6adc0527cf2331dbaae31a DIFF: https://github.com/llvm/llvm-project/commit/c9d2b6b92d6c29d00f6adc0527cf2331dbaae31a.diff LOG:

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz 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/D132913/new/ https://reviews.llvm.org/D132913 ___ c

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

2022-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D131465#3776841 , @nikic wrote: > In D131465#3776599 , @nikic wrote: > >> It looks like the switch to `-std=c++17` has some major compile-time impact: >> http://llvm-compile-time-track

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-09 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://reviews.llvm.org/D129883

[PATCH] D133570: Clang codegen, fixes issue with emitting partially initialized constant arrays larger than 2^32

2022-09-09 Thread Ofek Shochat via Phabricator via cfe-commits
OfekShochat added a subscriber: eli.friedman. OfekShochat added a comment. yep @eli.friedman. probably gonna scratch this idea, makes more sense to actually tackle the problem itself, which is that getArrayFiller doesnt return anything. trying to actually get to the problem, but its quite hard,

[PATCH] D133587: Loop names used in reporting can grow very large

2022-09-09 Thread Jamie Schmeiser 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 rG5e3ac7969039: Loop names used in reporting can grow very large (authored by jamieschmeiser). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[clang] 5e3ac79 - Loop names used in reporting can grow very large

2022-09-09 Thread Jamie Schmeiser via cfe-commits
Author: Jamie Schmeiser Date: 2022-09-09T13:45:14-04:00 New Revision: 5e3ac7969039678fc017a5599b051ea2b78075a4 URL: https://github.com/llvm/llvm-project/commit/5e3ac7969039678fc017a5599b051ea2b78075a4 DIFF: https://github.com/llvm/llvm-project/commit/5e3ac7969039678fc017a5599b051ea2b78075a4.dif

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

2022-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D131465#3780717 , @AaronLiu wrote: > This cause a large amount failures in our testing with errors such as: > > error: ISO C++17 does not allow 'register' storage class specifier > [-Wregister] > > error: ISO C++17 does no

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Sema/cast.c:2 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-unknown-unknown %s -verify +// RUN: %clang_cc1 -std=c99 -fsyntax-only -DConstantCast -Wvla -verify %s + Instead of adding this RUN line, I

[PATCH] D133570: Clang codegen, fixes issue with emitting partially initialized constant arrays larger than 2^32

2022-09-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1225 assert(CAT && "can't emit array init for non-constant-bound array"); -unsigned NumInitElements = ILE->getNumInits(); -unsigned NumElements = CAT->getSize().getZExtValue(); +uint

[PATCH] D130270: [clang][dataflow] Use a dedicated bool to encode which branch was taken

2022-09-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D130270#3780705 , @samestep wrote: > @ymandel Huh, interesting! I'll go ahead and abandon this patch, then? Please. Sorry I didn't catch this earlier! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D133194: rewording note note_constexpr_invalid_cast

2022-09-09 Thread Muhammad Usman Shahid via Phabricator via cfe-commits
Codesbyusman updated this revision to Diff 459121. Codesbyusman added a comment. updating one time again, to again run test as no failed test on my system. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133194/new/ https://reviews.llvm.org/D133194

[PATCH] D133578: [OpenMP] Add generation of SIMD align assumptions to OMPIRBuilder

2022-09-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Thanks for this patch! I have two drive by comments that should probably be addressed first. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:629 + llvm::ArrayRef AlignedVars, + llvm::Value *Alignment, Valu

[PATCH] D133499: [clang]: Add DeclContext::dumpDecl() in order to conveniently dump an AST from a DeclContext.

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ASTDumper.cpp:205 + if (const Decl *D = dyn_cast(this)) +D->dump(); +} shafik wrote: > aaron.ballman wrote: > > shafik wrote: > > > aaron.ballman wrote: > > > > erichkeane wrote: > > > > > aaron.

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

2022-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131465#3780717 , @AaronLiu wrote: > This cause a large amount failures in our testing with errors such as: > > error: ISO C++17 does not allow 'register' storage class specifier > [-Wregister] > > error: ISO C++17 d

  1   2   >