| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
test due to recent changes to the CFG. The
diagnostic is somewhat in the wrong place, but
the -Wunreachable-code diagnostic needs to be
revamped anyway since most of the diagnostics
in this test case are redundant.
llvm-svn: 121961
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implicit lvalue-to-rvalue casts that John McCall
recently introduced. This causes a whole bunch
of logic in the analyzer for handling lvalues
to vanish. It does, however, raise a few issues
in the analyzer w.r.t to modeling various constructs
(e.g., field accesses to compound literals).
The .c/.m analysis test cases that fail are
due to a missing lvalue-to-rvalue cast that
will get introduced into the AST. The .cpp
failures were more than I could investigate in
one go, and the patch was already getting huge.
I have XFAILED some of these tests, and they
should obviously be further investigated.
Some highlights of this patch include:
- CFG no longer requires an lvalue bit for
CFGElements
- StackFrameContext doesn't need an 'asLValue'
flag
- The "VisitLValue" path from GRExprEngine has
been eliminated.
Besides the test case failures (XFAILed), there
are surely other bugs that are fallout from
this change.
llvm-svn: 121960
|
| |
|
|
| |
llvm-svn: 121957
|
| |
|
|
| |
llvm-svn: 121956
|
| |
|
|
| |
llvm-svn: 121950
|
| |
|
|
|
|
|
| |
DeclarationNameInfo instances don't always have a non-NULL
TypeSourceInfo?
llvm-svn: 121940
|
| |
|
|
| |
llvm-svn: 121938
|
| |
|
|
| |
llvm-svn: 121934
|
| |
|
|
|
|
| |
in a forward @class object. // rdar://8774513
llvm-svn: 121933
|
| |
|
|
|
|
|
| |
drive-by, make sure to check for unexpanded parameter packs within the
name of a declaration.
llvm-svn: 121930
|
| |
|
|
| |
llvm-svn: 121928
|
| |
|
|
| |
llvm-svn: 121922
|
| |
|
|
|
|
|
| |
Also tweak the VCVT_F32_F16 entry in arm_neon.td to be more consistent with
the other floating-point conversion builtins. Radar 8068427.
llvm-svn: 121916
|
| |
|
|
|
|
|
| |
created for auto-synthesis are @private.
Fixes: // rdar://8769582
llvm-svn: 121913
|
| |
|
|
|
|
|
|
| |
declarations. This is a work in progress, as I go through the C++
declaration grammar to identify where unexpanded parameter packs can
occur.
llvm-svn: 121912
|
| |
|
|
|
|
| |
information for all of the explicit casts.
llvm-svn: 121900
|
| |
|
|
|
|
|
| |
unexpanded parameter pack" bit and that the recursive AST visitor can
then find those unexpanded parameter packs.
llvm-svn: 121899
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parameter packs within a statement, type, etc. Use this visitor to
provide improved diagnostics for the presence of unexpanded parameter
packs in a full expression, base type, declaration type, etc., by
highlighting the unexpanded parameter packs and providing their names,
e.g.,
test/CXX/temp/temp.decls/temp.variadic/p5.cpp:28:85: error: declaration type
contains unexpanded parameter packs 'VeryInnerTypes',
'OuterTypes', ...
...VeryInnerTypes, OuterTypes>, pair<InnerTypes, OuterTypes> > types;
~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ^
llvm-svn: 121883
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Diagnostic pragmas are broken because we don't keep track of the diagnostic state changes and we only check the current/latest state.
Problems manifest if a diagnostic is emitted for a source line that has different diagnostic state than the current state; this can affect
a lot of places, like C++ inline methods, template instantiations, the lexer, etc.
Fix the issue by having the Diagnostic object keep track of the source location of the pragmas so that it is able to know what is the diagnostic state at any given source location.
Fixes rdar://8365684.
llvm-svn: 121873
|
| |
|
|
|
|
| |
file in Sema. No functionality change.
llvm-svn: 121869
|
| |
|
|
|
|
| |
come first.
llvm-svn: 121866
|
| |
|
|
|
|
| |
parameters. Fixes <rdar://problem/8769025>.
llvm-svn: 121864
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
IntegerLiterals
BuildExpressionFromIntegralTemplateArgument can produce malformed
IntegerLiterals with an EnumType if the template parameter type
is an EnumType. This breaks the AST printer which expects all
IntegerLiterals to have a plain integer type. Instead, give the
IntegerLiteral the enum's promotion type and wrap in an implicit cast
to the EnumType.
llvm-svn: 121862
|
| |
|
|
|
|
| |
explicitly mark that all cases are handled.
llvm-svn: 121855
|
| |
|
|
|
|
| |
'clang::OverloadExpr'
llvm-svn: 121852
|
| |
|
|
|
|
|
| |
future task of performing contextual conversion to size_t in a VLA size
expression. :)
llvm-svn: 121836
|
| |
|
|
|
|
|
|
| |
within the class. Teach IR gen to look for function definitions in record
lexical contexts when deciding whether to emit a function whose address
was taken. Fixes PR8789.
llvm-svn: 121833
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
whether the expression contains an unexpanded parameter pack, in the
same vein as the changes to the Type hierarchy. Compute this bit
within all of the Expr subclasses.
This change required a bunch of reshuffling of dependency
calculations, mainly to consolidate them inside the constructors and
to fuse multiple loops that iterate over arguments to determine type
dependence, value dependence, and (now) containment of unexpanded
parameter packs.
Again, testing is painfully sparse, because all of the diagnostics
will change and it is more important to test the to-be-written visitor
that collects unexpanded parameter packs.
llvm-svn: 121831
|
| |
|
|
| |
llvm-svn: 121821
|
| |
|
|
| |
llvm-svn: 121795
|
| |
|
|
|
|
|
| |
the basic casting logic to insert intermediate casts and preserve the
exact complex-cast design. Fixes a crash in the test suite.
llvm-svn: 121776
|
| |
|
|
| |
llvm-svn: 121771
|
| |
|
|
|
|
|
| |
by valgrind where we were doing the wrong thing in the presence of invalid
exception specs.
llvm-svn: 121770
|
| |
|
|
| |
llvm-svn: 121768
|
| |
|
|
| |
llvm-svn: 121763
|
| |
|
|
| |
llvm-svn: 121759
|
| |
|
|
|
|
|
| |
class to be passed around. The line between argument and return types and
everything else is kindof vague, but I think it's justifiable.
llvm-svn: 121752
|
| |
|
|
| |
llvm-svn: 121742
|
| |
|
|
| |
llvm-svn: 121734
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and TemplateArgument with an operation that determines whether there
are any unexpanded parameter packs within that construct. Use this
information to diagnose the appearance of the names of parameter packs
that have not been expanded (C++ [temp.variadic]p5). Since this
property is checked often (every declaration, ever expression
statement, etc.), we extend Type and Expr with a bit storing the
result of this computation, rather than walking the AST each time to
determine whether any unexpanded parameter packs occur.
This commit is deficient in several ways, which will be remedied with
future commits:
- Expr has a bit to store the presence of an unexpanded parameter
pack, but it is never set.
- The error messages don't point out where the unexpanded parameter
packs were named in the type/expression, but they should.
- We don't check for unexpanded parameter packs in all of the places
where we should.
- Testing is sparse, pending the resolution of the above three
issues.
llvm-svn: 121724
|
| |
|
|
| |
llvm-svn: 121720
|
| |
|
|
|
|
| |
deleted.
llvm-svn: 121694
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
would return true if the initializer pointer union had *any* non-null
pointer in it, even if the pointer wasn't one that would actually be
returned via getInit(). This makes it more accurately model the logic of
'getInit() != NULL'.
This still isn't completely satisfying. From a principled stance,
I suspect we should make hasInit() and getInit() *always* return false
and NULL (resp.) for ParmVarDecl. We shouldn't at the API level treat
initializers and default arguments as the same thing.
llvm-svn: 121692
|
| |
|
|
|
|
|
|
|
|
|
|
| |
cases. First, omit all builtin overloads when no non-record type is in the set
of candidate types. Second, avoid arithmetic type overloads for non-arithmetic
or enumeral types (counting vector types as arithmetic due to Clang
extensions). When heavily using constructs such as STL's '<<' based stream
logging, this can have a significant impact. One logging-heavy test case's
compile time dropped by 10% with this. Self-host shows 1-2% improvement in
compile time, but that's likely in the noise.
llvm-svn: 121665
|
| |
|
|
| |
llvm-svn: 121654
|
| |
|
|
| |
llvm-svn: 121653
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
a translation unit to the ActOnEndOfTranslationUnit function instead of doing
it at the start of DefineUsedVTables. The latter is now called *recursively*
during template instantiation, which causes an absolutely insane number of
walks of every record decl in the translation unit.
After this patch, an extremely template instantiation heavy test case's compile
time drops by 10x, and we see between 15% and 20% improvement in average
compile times across a project. This is just recovering a regression, it
doesn't make anything faster than it was several weeks ago.
llvm-svn: 121644
|
| |
|
|
| |
llvm-svn: 121640
|
| |
|
|
|
|
|
| |
candidates. They're now wrapped in nice APIs which hide the tables, etc. Also
removes some repetitive code from clients.
llvm-svn: 121634
|
| |
|
|
|
|
|
|
|
|
|
|
| |
type. Localize all of the logic within a single function rather than spreading
it throughout the class.
Also fixes a buglet where we failed to check for a RHS arithmetic type wider
than the LHS and return its canonical type. I've yet to produce a test case
that breaks because of this, but it was spotted by inspection by folks on the
IRC channel and is obviously correct now.
llvm-svn: 121633
|