[PATCH] D121532: [Clang][WIP] Fix Unevaluated Lambdas

2022-03-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: clang-language-wg. aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:978-979 CXXRecordDecl *Class = createLambdaClosureType(Intro.Range, MethodTyInfo, KnownDependen

[PATCH] D119476: Generalize and harmonize sub-expression traversal

2022-03-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. Sorry for the delay in reviewing this, but this looks correct to me. I don't think the precommit CI failures on Debian relate to your patch, either, so this LGTM Repository: rG

[PATCH] D119477: Ignore FullExpr when traversing cast sub-expressions

2022-03-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The changes here generally look good, and I'm happy to see that more of our test cases are diagnosing similar to other compilers with the changes. Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:362-364 + { A k = to_lvalue_ref(A().ret_a()); }

[PATCH] D122029: Change __auto_type behavior with qualifiers to match GCC behavior

2022-03-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rsmith, comex, erichkeane, jyknight, rjmccall. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. Currently, Clang handles some qualifiers correctly for `__auto_type`, but

[PATCH] D121961: [clang] Produce a "multiversion" annotation in textual AST output.

2022-03-19 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 (I was surprised to see the Windows CI pass with that `sed` invocation!) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121961/

[PATCH] D122029: Change __auto_type behavior with qualifiers to match GCC behavior

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 416911. aaron.ballman added a comment. Updated based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122029/new/ https://reviews.llvm.org/D122029 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/Type.h clang/

[PATCH] D122029: Change __auto_type behavior with qualifiers to match GCC behavior

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:10290 +// information. +if (const auto *AT = LHS->getAs()) { + if (AT->getKeyword() == AutoTypeKeyword::GNUAutoType) erichkeane wrote: > So do we care if BOTH sides are thi

[PATCH] D122029: Change __auto_type behavior with qualifiers to match GCC behavior

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 416928. aaron.ballman marked 2 inline comments as done. aaron.ballman added a comment. Updated based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122029/new/ https://reviews.llvm.org/D122029 Files: clang/docs/ReleaseNot

[PATCH] D122147: Remove the clang/INPUTS directory; NFC

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rsmith, erichkeane, jcranmer, jdoerfert, lebedev.ri. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. This directory seems to be unused. At least, when I remove it, I ca

[PATCH] D120159: [Clang] Implement __builtin_source_location.

2022-03-21 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/D120159/new/ https://reviews.llvm.org/D120159

[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman removed a reviewer: clang-language-wg. aaron.ballman added inline comments. Comment at: clang/test/Modules/inconsist-export-template.cpp:1-2 +// RUN: %clang_cc1 -std=c++20 %s -fsyntax-only -verify +// expected-no-diagnostics +export module m; dblaik

[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: clang-language-wg. aaron.ballman added a comment. Oops, accidentally dropped the language wg somehow, adding them back. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120397/new/ https://reviews.llvm.org/D120397 ___

[PATCH] D122111: [clang-tidy] Fix false positives in `misc-redundant-expression` check

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp:605 + unless(isMacro()), unless(isInTemplateInstantiation()), + hasRHS(ignoringParenImpCasts(integerLiteral().bind(ConstId .bind(Overlo

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman resigned from this revision. aaron.ballman added a comment. In D54943#3394827 , @JonasToth wrote: > ping @aaron.ballman @njames93 :) Sorry, for my own sanity, I've stopped reviewing C++ Core Guideline reviews for their diagnostic behavior u

[PATCH] D122147: Remove the clang/INPUTS directory; NFC

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the reviews! I've commit in 95cf1903cf31c03889d50b9cecc3f293956d0d44 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D122029: Change __auto_type behavior with qualifiers to match GCC behavior

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:10294 +} +if (const auto *AT = LHS->getAs()) { + if (AT->isGNUAutoType()) erichkeane wrote: > xbolva00 wrote: > > Same? > Oooh, good catch! Looks like it should be RHS->ge

[PATCH] D121328: Disable -Wmissing-prototypes for internal linkage functions that aren't explicitly marked "static"""

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > once we figure out what to do about the change in behavior for > -Wnon-c-typedef-for-linkage The devil is in the details; I'm not sure what to do here. I don't think there's a way to compute the visibility without also computing the linkage, so I don't think th

[PATCH] D121715: [Clang] Fix an unused-but-set-variable warning with volatile variable

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:7925 DeclRefExpr *LHS = nullptr; + bool IsComponentAssign = false; if (BinaryOperator *BO = dyn_cast(E)) { Comment at: clang/test/Sema/warn-unused-but-set-v

[PATCH] D122155: Add warning when eval-method is set in the presence of value unsafe floating-point calculations.

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:127 +def warn_eval_method_setting_is_meaningless_in_value_unsafe_context: Warning< + "setting the eval method via the `ffp-eval-method` option or the `pragma clang fp eval_meth

[PATCH] D120185: [ASTMatchers] Output currently processing match and nodes on crash

2022-03-21 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/D120185/new/ https://reviews.llvm.org/D120185

[PATCH] D119476: Generalize and harmonize sub-expression traversal

2022-03-21 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. In D119476#3394189 , @kimgr wrote: > Thanks! Could you help me land it? Author: Kim Gräsman gmail.com>. Happy to! Repository: rG LL

[PATCH] D119476: Generalize and harmonize sub-expression traversal

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D119476#3394189 , @kimgr wrote: > Thanks! Could you help me land it? Author: Kim Gräsman gmail.com>. I've commit on your behalf in 276d2143148fd1519af8eef124dabc41eabb1bb0

[PATCH] D119477: Ignore FullExpr when traversing cast sub-expressions

2022-03-21 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. The changes here LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119477/new/ https://reviews.llvm.org/D119477 ___

[PATCH] D119477: Ignore FullExpr when traversing cast sub-expressions

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit on your behalf in 403d7d8d7093d6637a006f8b3f75382294259d3f , and I'm going to add a release note in a separate commit as I missed that feedback dur

[PATCH] D119477: Ignore FullExpr when traversing cast sub-expressions

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D119477#3397311 , @aaron.ballman wrote: > I've commit on your behalf in 403d7d8d7093d6637a006f8b3f75382294259d3f > , and > I'm going to add a release

[PATCH] D122155: Add warning when eval-method is set in the presence of value unsafe floating-point calculations.

2022-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:1065 + if (Tok.isNot(tok::annot_pragma_fp) && + getLangOpts().getFPEvalMethod() != LangOptions::FEM_UnsetOnCommandLine && zahiraam wrote: > aaron.ballman wrote: > > This looks

[PATCH] D122224: Allow -Wno-gnu to silence GNU extensions related to pointer arithmetic

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: nickdesaulniers, andrew.w.kaylor, eli.friedman, erichkeane. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. These diagnostics were added to a diagnostic group, but that

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Hello, @devin.jeanpierre! I'm wondering if we should revert this while you investigate the fix, or do you think you'll have this solved sometime today? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119017/new

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. I don't spot anything overly concerning in this patch, I believe it LGTM as well. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:38 + if (!b) +NonLiteral n; +} huber

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticASTKinds.td:69 +def note_constexpr_static_local : Note< + "control flows through the declaration of a %select{static|thread_local}0 variable">; def note_constexpr_subobject_declared_here : Not

[PATCH] D122227: Fix _BitInt suffix width calculation

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: mgehre-amd, erichkeane. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. @mgehre-amd pointed out the following post-commit review feedback on the changes in 8cba72177dcd

[PATCH] D122227: Fix _BitInt suffix width calculation

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the quick reviews, and thanks for catching the issue @mgehre-amd! I've committed in 9cf8f81ca45de198013f29442a7de6600b226d70 . Repository: rG LLV

[PATCH] D122155: Add warning when eval-method is set in the presence of value unsafe floating-point calculations.

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang/Basic/DiagnosticCommonKinds.td:127-129 +def warn_eval_method_setting_is_meaningless_in_value_unsafe_context : Warn

[PATCH] D121201: [clang] Merge the SourceRange into ParsedAttributes

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:2516-2521 + void takeAttributes(ParsedAttributes &attrs) { Attrs.takeAllFrom(attrs); -if (!lastLoc.isInvalid()) - SetRangeEnd(lastLoc); +if (attrs.Range.getEnd().isValid()) +

[PATCH] D122111: [clang-tidy] Fix false positives in `misc-redundant-expression` check

2022-03-22 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! Please also add a release note for the fix when you land it. Comment at: clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp:605 + unl

[PATCH] D121201: [clang] Merge the SourceRange into ParsedAttributes

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:2516-2521 + void takeAttributes(ParsedAttributes &attrs) { Attrs.takeAllFrom(attrs); -if (!lastLoc.isInvalid()) - SetRangeEnd(lastLoc); +if (attrs.Range.getEnd().isValid()) +

[PATCH] D119063: [SemaCXX] Properly scope ArgumentPackSubstitutionIndex when expanding base types

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: erichkeane. aaron.ballman added a comment. Adding Erich as he's been staring at the template instantiation code recently and may have thoughts/opinions. To me, this seems like the correct approach though. Comment at: clang/lib/Sema/SemaTemplate

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you also add a release note for the fix? Comment at: clang/include/clang/Sema/Sema.h:1075-1077 /// WeakUndeclaredIdentifiers - Identifiers contained in /// \#pragma weak before declared. rare. may alias another /// identifier, declare

[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

2022-03-22 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. In D120397#3398562 , @ChuanqiXu wrote: > Both `ast-dump` and `ast-dump=json` couldn't solve this. And I feel > `static_assert` is hard t

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:47 +CRLF, +CRLFCR, + }; LegalizeAdulthood wrote: > aaron.ballman wrote: > > LegalizeAdulthood wrote: > > > aaron.ballman wrote: > > > > I'm a bit

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8422 +def err_int_to_float_bit_int_max_size : Error< + "cannot convert '_BitInt' operands of more than %0 bits to floating point">; mgehre-amd wrote: > erichkeane

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt; increase max _BitInt size

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8422 +def err_int_to_float_bit_int_max_size : Error< + "cannot convert '_BitInt' operands of more than %0 bits to floating point">; mgehre-amd wrote: > aaron.ball

[PATCH] D122224: Allow -Wno-gnu to silence GNU extensions related to pointer arithmetic

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the review! I've landed in c3fe8ddd8385832fde9f16a261908afbaf9878a4 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D111400#3400011 , @hubert.reinterpretcast wrote: > Confirming LGTM with minor comments. > > In D111400#3399929 , @cor3ntin > wrote: > >> - We may still miss a compatibility warn

[PATCH] D122155: Add warning when eval-method is set in the presence of value unsafe floating-point calculations.

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticFrontendKinds.td:50-53 +def warn_eval_method_setting_via_option_in_value_unsafe_context : Warning< +"setting the eval method via '-ffp-eval-method' has not effect when numeric " +"result

[PATCH] D119017: [clang] roll-forward "[clang] Mark `trivial_abi` types as "trivially relocatable"".

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D119017#3400347 , @devin.jeanpierre wrote: > Please revert it, I don't have easy access to a Windows machine at work so am > struggling with the reproduction instructions. Thanks for letting us know! @Manna -- I'll let

[PATCH] D122249: [Clang] Add a compatibiliy warning for non-literals in constexpr.

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2725 +def warn_cxx20_compat_constexpr_var : Warning< + "definition of a %select{static variable|thread_local variable|variable of non-literal type}1 " "in a constexpr %select{fu

[PATCH] D122029: Change __auto_type behavior with qualifiers to match GCC behavior

2022-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. FWIW, I plan to land this sometime tomorrow (Mar 23) unless there are additional review comments before then. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122029/new/ https://reviews.llvm.org/D122029 ___ cfe-c

[PATCH] D118052: [X86] Fix CodeGen Module Flag for -mibt-seal

2022-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D118052#3401861 , @joaomoreira wrote: > I did track down the problem to clang/lib/Frontend/CompilerInvocation.cpp -- > RoundTrip method. There, we can se the following statement: > > #ifndef NDEBUG > bool DoRoundT

[PATCH] D120397: [C++20] [Modules] Make the linkage consistent for template and its specialization

2022-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D120397#3401380 , @ChuanqiXu wrote: > In D120397#3399808 , @aaron.ballman > wrote: > >> Can you also add a release note that explains we've fixed the crash? > > My thought is to

[PATCH] D121201: [clang] Merge the SourceRange into ParsedAttributes

2022-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, feel free to add the assert when you land. Comment at: clang/include/clang/Sema/ParsedAttr.h:813 void takeAllFrom(AttributePool &pool) { takePool(pool); pool.Attrs.clear();

[PATCH] D122249: [Clang] Add a compatibiliy warning for non-literals in constexpr.

2022-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm seeing precommit CI failures: Failed Tests (1): Clang :: SemaCXX/constant-expression-cxx2b.cpp Comment at: clang/lib/Sema/SemaDeclCXX.cpp:1905 +if (SemaRef.LangOpts.CPlusPlus2b) { + if (!VD->getType()->isLiteralType(SemaRe

[PATCH] D122278: [clang] Improve diagnostic for reopened inline namespace

2022-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for the fix! This LGTM with a minor nit, but please also add a release note for the fix. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:11062-11066 + if (auto *FirstNS = PrevNS->getFirstDecl()) +// 'inline' must appear on the original

[PATCH] D122249: [Clang] Add a compatibiliy warning for non-literals in constexpr.

2022-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122249#3402331 , @cor3ntin wrote: > - Fix test > - Add a comment explaining why we do not use CheckLiteralType > > @aaron,ballman I completely missed that...! No worries! > However, CheckLiteralType does a bunch of tes

[PATCH] D121122: Set FLT_EVAL_METHOD to -1 when fast-math is enabled.

2022-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D121122#3402334 , @bjope wrote: > Hello. We've got some problem in our downstream tests after this patch and > I'm trying to figure out how things are supposed to work. Maybe someone being > part of this review knows.

[PATCH] D122265: [Clang][NFC] Cleanup dcl.constexpr/p3 tests

2022-03-23 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, thanks for the cleanup! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122265/new/ https://reviews.llvm.org/D122265

[PATCH] D121078: Replace links to archived mailing lists by links to Discourse forums

2022-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D121078#3400810 , @SimplyDanny wrote: > @tonic, can you please have another look? If @tonic has any additional feedback, we can handle it post-commit at this point. I've gone ahead and committed this on your behalf in

[PATCH] D122261: [Clang][NFC] Some `const` for `IdentifierInfo *`s feeding `DeclarationName`

2022-03-23 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, thank you for the cleanup! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122261/new/ https://reviews.llvm.org/D122261 _

[PATCH] D122155: Add warning when eval-method is set in the presence of value unsafe floating-point calculations.

2022-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticFrontendKinds.td:50-53 +def warn_eval_method_setting_via_option_in_value_unsafe_context : Warning< +"setting the eval method via '-ffp-eval-method' has not effect when numeric " +"result

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Randstruct.h:31-35 +using llvm::SmallVectorImpl; + +bool randomizeStructureLayout(const ASTContext &Context, llvm::StringRef Name, + llvm::ArrayRef Fields, +

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think you're going to need semantic restrictions as well as parsing restrictions because of type deduction. Even if you don't support templates (yet), there's still `auto`, `decltype`, `__typeof__`, and `__auto_type` (I probably missed some, lol) to worry about.

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123167#3434289 , @beanz wrote: > In D123167#3434023 , @aaron.ballman > wrote: > >> I think you're going to need semantic restrictions as well as parsing >> restrictions because

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123167#3434364 , @tschuett wrote: > Relying on the parser to find semantic misbehavior sounds strange ... I had a meeting with @beanz today because I was also pretty surprised. Chris, it might make sense to type up a b

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123167#3434383 , @beanz wrote: > In D123167#3434375 , @aaron.ballman > wrote: > >> I had a meeting with @beanz today because I was also pretty surprised. >> Chris, it might mak

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122895/new/ https://reviews.llvm.org/D122895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D122808: [clang] Fix warnings when `-Wdeprecated-enum-enum-conversion` is enabled

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: llvm/unittests/ADT/STLExtrasTest.cpp:994 + enum A { Zero = 0, One = 1 }; + enum B { IntMax = INT_MAX, ULongLongMax = ULLONG_MAX }; + enum class C : unsigned { Two = 2 }; It looks like you need to include `` for

[PATCH] D122808: [clang] Fix warnings when `-Wdeprecated-enum-enum-conversion` is enabled

2022-04-07 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, thank you for the new interface and fixes! (Current Precommit CI failures look unrelated to me.) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122808/new/ https:/

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D116203#3434761 , @rjmccall wrote: > In D116203#3434515 , @cjdb wrote: > >> In D116203#3431612 , @rjmccall >> wrote: >> >>> In D116203#3

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-07 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. Changes LGTM, I also don't think we should hit these limits. Perhaps we should add some assertions to the ctor and the setter functions just to be sure though? Repository: rG

[PATCH] D121838: Generalize "check-all" umbrella targets, use for check-clang-tools

2022-04-07 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. I'm not an expert in CMake, but the changes look reasonable from what I do know. The current bot failures all look to be unrelated to the changes in this patch as best I can tell

[PATCH] D122808: [clang] Fix warnings when `-Wdeprecated-enum-enum-conversion` is enabled

2022-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122808#3435821 , @antoniofrighetto wrote: > Awesome, thank you for reviewing this! PS: I do not have commit access, feel > free to close it, if you say. Ah, thank you for letting me know you don't have commit access.

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123298#3435796 , @cor3ntin wrote: > In D123298#3435770 , @aaron.ballman > wrote: > >> Changes LGTM, I also don't think we should hit these limits. Perhaps we >> should add some

[PATCH] D122808: [clang] Fix warnings when `-Wdeprecated-enum-enum-conversion` is enabled

2022-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thank you for the fix! I've landed on your behalf in 7c3d8c8977cfc013254783b85b9fc6026566b35f . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122808/n

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Recap: aside from the function merging behavior and the possible question about assertions in tests, I think this is ready to go. Comment at: clang/lib/Sema/SemaDecl.cpp:27 #include "clang/AST/NonTrivialTypeVisitor.h" +#include "clang/AST/Randst

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-07 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! There's an open question about the circumstances under which we emit the `err_hlsl_attr_unsupported_in_stage` diagnostic, but if there's code to be changed there, it can be

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122983#3433919 , @erichkeane wrote: > Up for review: https://reviews.llvm.org/D123241 Thank you @erichkeane! That landed in a87f4e4f9808a397dc4c575013142c9eac0b7eba

[PATCH] D123278: [Clang] [Docs] Add HLSLSupport page

2022-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for getting a start on this documentation, I appreciate it! Comment at: clang/docs/HLSLSupport.rst:11 + +HLSL Support is a new initiative underway in the Clang codebase. This document +describes the high level goals of the project, the guid

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks @erichkeane! @jyknight, @hubert.reinterpretcast, @eli.friedman -- I'll likely land this sometime tomorrow unless I hear from you. But if I land it and you still have comments, I'll be happy to address them post commit. CHANGES SINCE LAST ACTION https://

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D116203#3436572 , @cjdb wrote: > Having `__remove_cv` do more than it's advertised to do doesn't sound like a > great idea to me. Both libc++ >

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-08 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. Precommit CI is failing on one test: Failed Tests (1): Clang :: Misc/pragma-attribute-supported-attributes-list.test but with that test fixed, this LGTM! (Feel free to land wi

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/DeclTemplate.h:1151-1152 protected: - // FIXME: These probably don't need to be ints. int:5 for depth, int:8 for - // position? Maybe? - unsigned Depth; - unsigned Position; +#define DEPTH_BITWIDTH 20 +

[PATCH] D123278: [Clang] [Docs] Add HLSLSupport page

2022-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/HLSLSupport.rst:150-152 +HLSL has a ``precise`` qualifier that behaves unlike anything else in the C +language. The support for this qualifier in DXC is buggy, so our bar for +compatibility is low. beanz

[PATCH] D101624: [clang-tidy] Make performance-inefficient-vector-operation work on members

2022-04-08 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. Sorry, this fell off my radar! LGTM, but please add a release note for the fix when landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

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

2022-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:6409-6411 +- The attribute will not cause any additional data to be output to LLVM IR, + object files or debug information. It is only intended to be consumed using + Clang APIs by source-lev

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

2022-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Also, you should add a release note about the new attribute and check the Precommit CI pipeline failure out: Failed Tests (1): Clang :: CodeGenCXX/annotate-type.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D123278: [Clang] [Docs] Add HLSLSupport page

2022-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/HLSLSupport.rst:150-152 +HLSL has a ``precise`` qualifier that behaves unlike anything else in the C +language. The support for this qualifier in DXC is buggy, so our bar for +compatibility is low. beanz

[PATCH] D123278: [Clang] [Docs] Add HLSLSupport page

2022-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Comment at: clang/docs/HLSLSupport.rst:150-152 +HLSL has a ``precise`` qualifier that behaves unlike anything else in the C +language. The support for this qualifier in DXC is buggy, so our bar for +comp

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Some drive by comments, I plan to do a more thorough review when I have the chance. Comment at: clang/docs/ReleaseNotes.rst:97 and `51641 `_. -- The builtin function __builtin_dump_struct woul

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm sorry, but I had to revert this (in 4aaf25b4f7d7695ada313a3159d234b84d2896b2 ) as it broke the bots. https://lab.llvm.org/buildbot/#/builders/109/builds/36233 Repository: rG LLVM Github

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-08 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG11da1b53d8cd: [C89/C2x] Improve diagnostics around strict prototypes in C (authored by aaron.ballman). Changed prior to commit: https://reviews.llvm.org/D122895?vs=419853&id=421627#toc Repository: rG

[PATCH] D123349: [clang-tidy] Deal with keyword tokens in preprocessor conditions

2022-04-08 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! Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:281 +inline StringRef getTokenName(const Token &Tok) { + return Tok.is(tok::raw

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4244 + if (const Arg *A = Args.getLastArg(OPT_frandomize_layout_seed_file_EQ)) { +std::ifstream SeedFile(A->getValue(0)); MaskRay wrote: > void wrote: > > MaskRay wr

[PATCH] D123345: Treat `std::move`, `forward`, and `move_if_noexcept` as builtins.

2022-04-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for this, it's a great improvement! I think it's generally correct, but I did have some minor questions. > Most of these improvements are very small, but I measured a 3% decrease in > -O0 object file size for a simple C++ source file using the standard l

[PATCH] D123456: [C89/C2x] Diagnose calls to a function without a prototype but passes arguments

2022-04-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: jyknight, hubert.reinterpretcast, delcypher, erichkeane, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. This catches places where a function without

[PATCH] D123456: [C89/C2x] Diagnose calls to a function without a prototype but passes arguments

2022-04-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 421738. aaron.ballman marked 2 inline comments as done. aaron.ballman added a comment. Updated based on review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123456/new/ https://reviews.llvm.org/D123456 Files: clang/docs/ReleaseNot

[PATCH] D123456: [C89/C2x] Diagnose calls to a function without a prototype but passes arguments

2022-04-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:7052 +// the call, diagnose this as calling a function without a prototype. +// However, if we found a function declaration, check to see if the strict +// uses without a prototype warning wa

[PATCH] D123345: Treat `std::move`, `forward`, and `move_if_noexcept` as builtins.

2022-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123345#3441262 , @joerg wrote: > As is, I think this conflicts with `-ffreestanding` assumptions or at the > very least the spirit. Why? These functions are in `` which is not required in freestanding, but implementat

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 421786. aaron.ballman added a comment. Rebased CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122983/new/ https://reviews.llvm.org/D122983 Files: clang-tools-extra/clangd/IncludeFixer.cpp clang-tools-extra/clangd/ParsedAST.cpp clang-tool

[PATCH] D116280: [clang] adds unary type trait checks as compiler built-ins

2022-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:4889-4890 return T->isArrayType(); + case UTT_IsBoundedArray: +return T->isArrayType() && !T->isIncompleteArrayType(); + case UTT_IsUnboundedArray: Is a VLA a bounded array

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Type.h:6535 + const auto *F = Self.getAs(); + return F == nullptr || + (F->getMethodQuals().empty() && F->getRefQualifier() == RQ_None); You can turn this into an assert that `F` i

<    26   27   28   29   30   31   32   33   34   35   >