rsmith added a comment.
In https://reviews.llvm.org/D52386#1254483, @leonardchan wrote:
> In https://reviews.llvm.org/D52386#1254437, @rsmith wrote:
>
> > I'm not at all convinced that this is a good thing. There isn't such a
> > thing as "undefined behavior sanitizer". Rather, there are a whole
rsmith added inline comments.
Comment at: include/clang/Basic/AttrDocs.td:3513
+ int x = 2;
+ int &y = x; // warning: 'noderef' can only be used on an array or pointer
type
+
Should `noderef` appear somewhere in this example? :)
Comment at:
rsmith added a comment.
I'm not at all convinced that this is a good thing. There isn't such a thing as
"undefined behavior sanitizer". Rather, there are a whole bunch of different
checks that fall under the same umbrella. This test seems on the surface to be
about as meaningless as `__has_feat
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
LGTM, thanks!
Repository:
rC Clang
https://reviews.llvm.org/D52849
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.o
rsmith added a comment.
Maybe take this very slightly further so it becomes testable: change the
expression evaluator (lib/AST/ExprConstant.cpp) so it treats floating-point
operations as non-constant if they're potentially-overflowing.
You also need to update lib/Serialization/AST{Reader,Writer
rsmith added inline comments.
Comment at: include/clang/Basic/DiagnosticGroups.td:164
+def ExtraSemiStmt : DiagGroup<"extra-semi-stmt">;
+def EmptyInitStatement : DiagGroup<"empty-init-stmt">;
def ExtraSemi : DiagGroup<"extra-semi", [CXX98CompatExtraSemi,
I thin
rsmith added inline comments.
Comment at: test/Sema/unary-minus-integer-impcast-2.c:1
+// RUN: %clang_cc1 %s -verify -Wconversion -fsyntax-only -triple
i386-pc-linux-gnu
+
You can combine the two tests together into a single file using a #ifdef to
detect which
rsmith added a comment.
Downgrading the C89 warning for duplicate qualifiers from typedefs / __typeof
from `ExtWarn` to `Extension` seems very reasonable to me. However, I don't see
a justification for removing the warning for duplicate explicit (non-typedef)
qualifiers in C99, nor for downgrad
rsmith added a comment.
Like Eli, I don't see much value in this warning. But it doesn't seem much
different from `-Wextra-semi` in that regard for languages in which such extra
semicolons are generally valid -- I expect both warnings will generally
diagnose typos and little else.
Does this wa
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Looks good to me. Please first mail cfe-dev announcing this change and wait a
day or so for anyone using this feature to speak up before committing.
Comment at: test/Coverag
rsmith added a comment.
This is still evaluating the expression twice. To evaluate it only once, you'll
need to sink the checks into `Sema::VerifyIntegerConstantExpression`'s call to
`EvaluateKnownConstInt`. (That should also remove the redundant diagnostics
noise in the language modes where si
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Thanks!
Comment at: lib/Sema/SemaChecking.cpp:10899
+ if (TargetRange.Width > SourceRange.Width)
+if (auto *UO = dyn_cast(E))
Add braces to these oute
rsmith added a comment.
We're going to try evaluating the array size anyway (in `isArraySizeVLA`). It
would be much better to produce the overflow warnings as part of that
evaluation rather than adding an extra evaluation step to produce them.
https://reviews.llvm.org/D52750
___
rsmith added a comment.
Do we need `-print-decl-contexts` at all? It's not exposed by the driver, not
tested, not documented, has a very strange output format (the bracketing
character supplies some information about the kind of declaration, but it's not
clear *what* information), and it doesn'
rsmith added a comment.
In https://reviews.llvm.org/D52339#1249457, @aaron.ballman wrote:
> In https://reviews.llvm.org/D52339#1249432, @erik.pilkington wrote:
>
> > Ping! This doesn't really affect CUDA or OpenCL more than any change to the
> > compiler, so I don't think it makes sense to block
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Thanks for the cleanup! Maybe consider running `clang-format-diff` on this?
Comment at: lib/Sema/SemaOverload.cpp:10813-10814
- llvm::sort(Cands.begin(), Cands.end(),
+ l
rsmith added a comment.
The right way to produce diagnostics under pedantic mode is to model them as
Extension or ExtWarn in the .td file, not by checking the Pedantic diagnostic
option directly. If this is an intentional GNU extension too, that makes things
a bit more complex (one approach wou
rsmith added a comment.
I think the check is wrong here. We need this `clear` call to reinitialize the
object after moving from it. Maybe that function should be annotated as
reinitializing the object instead?
Repository:
rC Clang
https://reviews.llvm.org/D52446
_
rsmith added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4683-4686
+ "Member '%0' marked with 'exclude_from_explicit_instantiation' attribute is "
+ "not defined but an explicit template instantiation declaration exists. "
+ "Reliance on this
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Parse/ParseTemplate.cpp:949-950
GreaterThanIsOperatorScope G(GreaterThanIsOperator, false);
-if (Tok.isNot(tok::greater) && Tok.isNot(tok::
rsmith added a comment.
We don't want to allocate storage for the lambda fields for non-lambda classes,
which is why we use distinct base classes. Is the problem you're trying to
solve here that we fake a definition in AST deserialization before we know
whether the class is a lambda? If so, tha
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Basic/Module.cpp:81
+ // 2, Environment
+ // 3. Platform-Environment
+ if (Platform == Feature || Target.getTriple().getOSName() == Feature ||
rsmith added a comment.
In https://reviews.llvm.org/D52137#1236065, @Quuxplusone wrote:
> In https://reviews.llvm.org/D52137#1236053, @rsmith wrote:
>
> > I think we can and should do better about false positives here. If you move
> > this check to SemaChecking, you can produce the warning in a
rsmith added a comment.
I think we can and should do better about false positives here. If you move
this check to SemaChecking, you can produce the warning in a context where you
know what the final type is -- I don't think there's any reason to warn if the
final type is signed and no wider tha
rsmith added a comment.
Looks good other than the warning, which I don't yet understand.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4683-4686
+ "Member '%0' marked with 'exclude_from_explicit_instantiation' attribute is "
+ "not defined but an explicit templ
rsmith accepted this revision.
rsmith added inline comments.
Comment at: clang/lib/Frontend/DependencyFile.cpp:340
+return;
+ StringRef Filename = File->getName();
+ if (!FileMatchesDepCriteria(Filename.data(), FileType))
vsapsai wrote:
> rsmith wrote:
> >
rsmith added inline comments.
Comment at: docs/Modules.rst:476-477
+
+*platform-environment*
+ A platform-environment variant (e.g. ``linux-gnueabi``, ``windows-msvc``) is
available.
What is the reason to allow these to be combined into a single feature name
rsmith added inline comments.
Comment at: clang/lib/Frontend/DependencyFile.cpp:340
+return;
+ StringRef Filename = File->getName();
+ if (!FileMatchesDepCriteria(Filename.data(), FileType))
Should we really be using the (arbitrary) name of the file from th
rsmith added inline comments.
Comment at: lib/Frontend/DependencyFile.cpp:325
+void DFGImpl::HasInclude(SourceLocation Loc, const FileEntry *File) {
+ if (!File)
+return;
vsapsai wrote:
> rsmith wrote:
> > Have you thought about whether we should add a depen
rsmith added inline comments.
Comment at:
clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:551
if (Decl->isMain() || !Decl->isUserProvided() ||
-Decl->isUsualDeallocationFunction() ||
-Decl->isCopyAssignmentOperator() || Decl->isMoveAssignm
rsmith added a comment.
In https://reviews.llvm.org/D51789#1235100, @ldionne wrote:
> In https://reviews.llvm.org/D51789#1235096, @rsmith wrote:
>
> > OK, so the semantics of this attribute are "explicit instantiation
> > declarations or definitions applied to the enclosing class do not apply to
rsmith added a comment.
In https://reviews.llvm.org/D51789#1234903, @ldionne wrote:
> I think now's a good time to bikeshed the name of the attribute if you have
> other suggestions.
OK, so the semantics of this attribute are "explicit instantiation declarations
or definitions applied to the
rsmith added inline comments.
Comment at: clang/include/clang/Driver/CC1Options.td:356-357
+HelpText<"Enable VTable interleaving">;
+def disable_vtable_interleaving : Flag<["-"], "disable-vtable-interleaving">,
+HelpText<"Disable VTable interleaving">;
//===
rsmith added inline comments.
Comment at: clang/lib/Sema/SemaLambda.cpp:1427
if (RefResult.isInvalid())
return ExprError();
Expr *Ref = RefResult.get();
This early exit leaves your CodeSynthesisContext on the stack. Consider using
RAII?
rsmith added a comment.
Thank you!
Comment at: include/clang/Basic/DiagnosticASTKinds.td:172
"non-trivially-copyable type %1">;
+def note_constexpr_memcpy_incompletetype : Note<
+ "cannot constant evaluate '%select{memcpy|memmove}0' between objects of "
Nit
This revision was automatically updated to reflect the committed changes.
Closed by commit rL342177: Diagnose likely typos in #include directives.
(authored by rsmith, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D51333?vs=165361&id=
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Looks good (with a couple of minor code style adjustments). Do you need someone
to commit this for you?
In https://reviews.llvm.org/D51333#1233042, @sammccall wrote:
> One thing I'd like to d
rsmith added inline comments.
Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:1268
+ // Instantiate the attributes on both the template declaration and the
associated record declaration.
+ SemaRef.InstantiateAttrsForDecl(TemplateArgs, Pattern, Inst, LateAttrs,
Star
rsmith added a comment.
Thanks, some comments but the approach here looks great.
Comment at: include/clang/Basic/DiagnosticLexKinds.td:428-429
+def err_pp_file_not_found_typo_not_fatal
+: Error<"'%0' file not found due to leading or trailing non-alphanumeric "
+
rsmith added inline comments.
Comment at: lib/CodeGen/CodeGenModule.cpp:961-970
if (const auto *FD = dyn_cast(ND))
if (FD->isMultiVersion() && !OmitMultiVersionMangling) {
if (FD->isCPUDispatchMultiVersion() || FD->isCPUSpecificMultiVersion())
AppendCPUSpe
rsmith added inline comments.
Comment at: include/clang/Basic/Attr.td:2031-2042
+mutable unsigned ActiveArgIndex = 0;
+void AdvanceActiveArgIndex() const {
+ ++ActiveArgIndex;
+ while(ActiveArgIndex < featuresStrs_size()) {
+if (std::find(featuresStrs_be
This revision was automatically updated to reflect the committed changes.
Closed by commit rL341734: Do not use optimized atomic libcalls for misaligned
atomics. (authored by rsmith, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D51817
F
This revision was automatically updated to reflect the committed changes.
Closed by commit rC341734: Do not use optimized atomic libcalls for misaligned
atomics. (authored by rsmith, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D51817?vs=164517&id=164544#toc
Repository:
rsmith added inline comments.
Comment at: lib/CodeGen/CGAtomic.cpp:949
case AtomicExpr::AO__opencl_atomic_compare_exchange_strong:
case AtomicExpr::AO__atomic_load_n:
case AtomicExpr::AO__atomic_store_n:
efriedma wrote:
> Is there any particular re
rsmith added a comment.
I'm not a fan of the duplication introduced here, but the new code is
definitely more obvious. On balance, this seems like a small improvement, so
let's go for it.
Comment at: b/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp:542-544
+ // cpu_disp
rsmith created this revision.
rsmith added reviewers: jyknight, t.p.northover.
Herald added a subscriber: jfb.
The optimized (__atomic_foo_) libcalls assume that the atomic object
is properly aligned, so should never be called on an underaligned
object.
This addresses one of several problems iden
rsmith added a comment.
It'd be good to test that `[[no_extern_template]]` affects instantiation, not
just code generation (eg, put something in the body of the entity that will
trigger an error if instantiated, and check that the diagnostic is produced at
the right times).
Repository:
rL L
rsmith added a comment.
Fixed in r341499.
Repository:
rC Clang
https://reviews.llvm.org/D51608
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rsmith added a comment.
I had a look at fixing this, and it... snowballed into a much larger change
than I was expecting. I have a patch on the way.
Repository:
rC Clang
https://reviews.llvm.org/D51608
___
cfe-commits mailing list
cfe-commits@li
rsmith added a comment.
Herald added a subscriber: jfb.
There's still something wrong here: in the cases where we produce these
warnings, we still produce calls to `__atomic_*_` library functions. Those
functions are specified to only work on properly-aligned inputs, so that's
wrong. And there
rsmith added a comment.
Please also teach constant expression evaluation (lib/AST/ExprConstant.cpp) to
look through these builtins when evaluating.
https://reviews.llvm.org/D51200
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists
rsmith added inline comments.
Comment at: lib/Serialization/ASTReaderDecl.cpp:1766
+
+// FIXME: handle serialized lambdas
assert(!DD.IsLambda && !MergeDD.IsLambda && "faked up lambda definition?");
Did you mean to add this FIXME?
Comme
rsmith added a comment.
I think this is addressing a symptom rather than the cause. The bug appears to
be that when parsing a.h, we end up with inconsistent exception specifications
along the redeclaration chain. It looks like
`Sema::AdjustDestructorExceptionSpec` doesn't do the right thing whe
This revision was automatically updated to reflect the committed changes.
Closed by commit rL341437: Allow all supportable non-type attributes to be used
with #pragma clang… (authored by rsmith, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.o
rsmith added a comment.
I think this patch is nearly ready to commit. However... if you want to handle
macros that specify a sequence of attributes, we should switch to treating the
macro name as a separate type sugar node rather than modeling it as a name for
the `AttributedType` node. Up to y
rsmith added a comment.
+rjmccall for CodeGen changes
https://reviews.llvm.org/D51200
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rsmith added a comment.
> Support for constructor calls (`CXXTemporaryExpr`) should also be possible,
> but is not the part of this patch.
(You should handle the base class (`CXXConstructExpr`) that describes the
semantics, rather than the derived class (`CXXTemporaryObjectExpr`) that
describe
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Sema/SemaInit.cpp:1827-1829
+ if (SemaRef.DiagnoseUseOfDecl(Destructor, Loc))
+return false;
+ return true;
Usual Clang convention
rsmith added a comment.
In https://reviews.llvm.org/D51333#1220878, @christylee wrote:
> In https://reviews.llvm.org/D51333#1219938, @rsmith wrote:
>
> > Instead of guessing whether the corrected filename would be valid, why not
> > strip off the leading and trailing non-alphanumeric characters,
rsmith updated this revision to Diff 163584.
rsmith added a comment.
Don't add #pragma clang attribute support for 'mode' and 'ext_vector_type'.
Repository:
rC Clang
https://reviews.llvm.org/D51507
Files:
include/clang/Basic/Attr.td
test/Misc/pragma-attribute-supported-attributes-list.te
rsmith marked an inline comment as done.
rsmith added a comment.
Based on the comments so far, my inclination is to allow `#pragma clang
attribute` on all these attributes, including the highlighted ones where it's
hard to think of cases where it'd be useful. I think our policy should be that
w
rsmith added inline comments.
Comment at: lib/Sema/SemaInit.cpp:830
+
+ for (FieldDecl *FD : CXXRD->fields())
+if (auto *CXXRDMember = FD->getType()->getAsCXXRecordDecl())
rsmith wrote:
> I think this now checks too much: only those subobjects for which we f
rsmith added a comment.
This is in good shape. Some relatively minor comments (plus there are some
unrelated whitespace changes in a few files); the only nontrivial comment I
have is that I think it'd be cleaner to cache `StringLiteral*`s rather than
adding a new form of `LValueBase` for the ca
rsmith marked an inline comment as done.
rsmith added inline comments.
Comment at: test/Misc/pragma-attribute-supported-attributes-list.test:27-32
+// CHECK-NEXT: CUDAConstant (SubjectMatchRule_variable)
+// CHECK-NEXT: CUDADevice (SubjectMatchRule_function,
SubjectMatchRule_var
rsmith added a comment.
+@tra for CUDA attributes
Comment at: test/Misc/pragma-attribute-supported-attributes-list.test:1
// RUN: clang-tblgen -gen-clang-test-pragma-attribute-supported-attributes
-I%src_include_dir %src_include_dir/clang/Basic/Attr.td -o - | FileCheck %s
-
rsmith added a comment.
In https://reviews.llvm.org/D30009#1218669, @dexonsmith wrote:
> In https://reviews.llvm.org/D30009#1218647, @rsmith wrote:
>
> > If we really want an "only documented attribtues can use this feature" rule
> > (and I'm really not convinced that is a useful rule to enforce
rsmith created this revision.
rsmith added reviewers: aaron.ballman, arphaman.
We previously disallowed use of undocumented attributes with #pragma clang
attribute, but the justification for doing so was weak and it prevented many
reasonable use cases.
Repository:
rC Clang
https://reviews.llv
rsmith added a comment.
Instead of guessing whether the corrected filename would be valid, why not
strip off the leading and trailing non-alphanumeric characters, look up the
resulting filename, and find out? If we did that, then not only could we be a
lot more confident that we'd found the fil
rsmith accepted this revision.
rsmith added a comment.
Thank you for doing this!
Repository:
rC Clang
https://reviews.llvm.org/D50353
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
rsmith marked an inline comment as done.
rsmith added inline comments.
Comment at: utils/TableGen/ClangAttrEmitter.cpp:3881
+SpellingKind K = (SpellingKind)Kind;
+// FIXME: Why are Microsoft spellings not listed?
+if (K == SpellingKind::Microsoft)
aar
This revision was automatically updated to reflect the committed changes.
Closed by commit rL341097: Improve attribute documentation to list which
spellings are used in which… (authored by rsmith, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm
rsmith created this revision.
rsmith added a reviewer: aaron.ballman.
Herald added a subscriber: cfe-commits.
Instead of listing all the spellings (including attribute namespaces) in
the section heading, only list the actual attribute names there, and
list the spellings in the supported syntaxes t
rsmith added a comment.
In https://reviews.llvm.org/D30009#1218647, @rsmith wrote:
> One consequence of this patch (see https://reviews.llvm.org/rL341002) is that
> adding documentation to an existing attribute //changes the behavior of
> Clang//. That does not seem acceptable to me: documentat
rsmith added a comment.
Herald added a subscriber: llvm-commits.
One consequence of this patch (see https://reviews.llvm.org/rL341002) is that
adding documentation to an existing attribute //changes the behavior of
Clang//. That does not seem acceptable to me: documentation improvements should
rsmith added a comment.
Looks good, thanks for improving our documentation!
Repository:
rC Clang
https://reviews.llvm.org/D51190
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rsmith added inline comments.
Comment at: include/clang/Basic/AttrDocs.td:3518
+the behavior of ``inline`` in both C99 inline semantics and C++ inline
+semantics).
+
Might be useful to be a bit more explicit about how it differs:
> [...] is just a hint. In parti
rsmith added a comment.
You also need to update the various other places that create `AttributedType`s
(eg, template instantiation, ASTImporter, deserialization) to pass in the macro
name. You can try removing the default argument from
`ASTContext::getAttributedType` to find other places that
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Headers/mm_malloc.h:42
extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t
__size);
+extern "C" void(free)(void *ptr);
+extern "C"
rsmith added a comment.
+@aaron.ballman for attributes-related changes.
It would be easier and more precise to track the macro corresponding to an
attribute in the `Parser` rather than in `Sema` (and stash it on the
`ParsedAttr` for consumers such as `Sema` that want it). That way, we still
ha
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Sema/SemaLambda.cpp:1422-1424
auto Entity = InitializedEntity::InitializeLambdaCapture(
Var->getIdentifier(), Field->getType(), Loc);
I
rsmith added a comment.
I think `-gcc-toolchain`, if specified, should simply be taken as the location
of the GCC toolchain; we should never go looking for it anywhere else if
`-gcc-toolchain` is specified. So I think the patch is not quite right as-is,
as it also affects that case. I think the
rsmith added a comment.
What about `-mlong-double-128`? It seems sensible to me to add support for that
at the same time.
It looks like this also needs to affect name mangling. As far as I can tell
from some quick testing, on ppc64-linux-gnu GCC uses `e` for 64-bit `long
double` and `g` for 12
rsmith added inline comments.
Comment at: include/clang/Basic/AttrDocs.td:3514-3516
+(possibly due to being referred to by function pointer), then no out of line
+definition will be emitted (instead of c99's behaviour of always emitting an
+out of line definition).
--
rsmith added inline comments.
Comment at: include/clang/AST/ASTContext.h:1428
+ QualType equivalentType,
+ IdentifierInfo *AddressSpaceMacroII = nullptr);
There is no reason to make this specific to addres
rsmith added inline comments.
Comment at: clang/lib/Sema/SemaLambda.cpp:1422-1424
auto Entity = InitializedEntity::InitializeLambdaCapture(
Var->getIdentifier(), Field->getType(), Loc);
InitializationKind InitKind = InitializationKind::CreateDirect(Loc, Loc,
Loc);
-
rsmith added a comment.
I would prefer that we use the location of the capture-default as the location
of all the implicitly captured fields, rather than using an invalid location.
Comment at: clang/lib/Sema/SemaDecl.cpp:10689
- S.DiagRuntimeBehavior(DRE->getBeginLoc(),
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Sema/SemaType.cpp:5600-5605
if (DependentAddressSpaceTypeLoc DASTL =
CurrTL.getAs()) {
fillDependentAddressSpaceTypeLoc(DASTL, D.getT
rsmith added a comment.
In https://reviews.llvm.org/D51240#1213179, @davidxl wrote:
> Can you split the patch into two? One for sample PGO and one for
> instrumentation.
I've split the patch up thusly:
https://reviews.llvm.org/D51246 is the common infrastructure shared by sample
PGO and inst
rsmith updated this revision to Diff 162505.
rsmith added a comment.
Herald added a subscriber: hiraditya.
(Tweak diff so phabricator shows clang/ and llvm/ prefixes on filenames and add
more context.)
https://reviews.llvm.org/D51240
Files:
clang/docs/ReleaseNotes.rst
clang/docs/UsersManua
rsmith created this revision.
rsmith added reviewers: davidxl, tejohnson, dlj, erik.pilkington.
Herald added subscribers: dexonsmith, steven_wu, mgorny, mehdi_amini.
This can be used to preserve profiling information across codebase changes that
have widespread impact on mangled names, but across
rsmith added inline comments.
Comment at: lib/Sema/SemaType.cpp:5816
+if (!T.isNull()) {
+ if (!T->getAs()) {
+ASTContext &Ctx = S.Context;
We should also create the AttributedType to track the source syntax in the
dependent case. If we don't, t
rsmith added inline comments.
Comment at: lib/AST/TypePrinter.cpp:1430-1431
+ if (T->getAttrKind() == attr::AddressSpace)
+return;
+
Please justify why this is appropriate with a comment.
Comment at: lib/AST/TypePrinter.cpp:1501-1502
+
+
rsmith accepted this revision.
rsmith added inline comments.
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1150
+ Opts.SpeculativeLoadHardening =
+ Args.hasFlag(OPT_mspeculative_load_hardening,
You can just use `hasArg(OPT_mspeculative_load_harden
rsmith added inline comments.
Comment at: clang/include/clang/Driver/Options.td:2004-2007
+def mspeculative_load_hardening : Flag<["-"], "mspeculative-load-hardening">,
+ Group, Flags<[CoreOption,CC1Option]>;
+def mno_speculative_load_hardening : Flag<["-"],
"mno-speculative-lo
rsmith added inline comments.
Comment at: lib/Parse/ParseExpr.cpp:1126
+
+Actions.StartCheckingNoDeref();
+
leonardchan wrote:
> rsmith wrote:
> > This parser-driven start/stop mechanism will not work in C++ templates.
> > Instead, can you remove the "start"
rsmith added a comment.
Another possibility would be to add a command-line argument to set the version
of GCC that clang pretends to be. We have a similar mechanism for our MSVC
compatibility mode already.
Repository:
rC Clang
https://reviews.llvm.org/D51011
_
rsmith added a comment.
We are not fully compatible with any version of GCC later than 4.2, as we do
not implement `__builtin_va_arg_pack` / `__builtin_va_arg_pack_len`. These
builtins are used by the glibc headers if we claim to be GCC >= 4.3 (at least
according to
http://clang.llvm.org/docs/
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Seems fine to me, once you add the test for always_destroy + no_destroy.
Comment at: clang/include/clang/Basic/LangOptions.def:311
+LANGOPT(RegisterStaticDestructors, 1, 1,
rsmith added inline comments.
Comment at: lib/Basic/SourceLocation.cpp:89-93
+ B.print(OS, SM);
+ OS << ",\n ";
+ E.print(OS, SM);
+ OS << "]\n";
+}
It would seem somewhat more natural to dump `SourceRange`s the same way we dump
them in `-ast-dump`. (That is
rsmith added inline comments.
Comment at: clang/include/clang/AST/Decl.h:1472
+ /// Do we need to emit an exit-time destructor for this variable?
+ bool isNoDestroy(const ASTContext &) const;
jfb wrote:
> This is only valid for static variables, right? It's p
1601 - 1700 of 2301 matches
Mail list logo