| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
flag as GCC uses: -fstrict-enums). There is a *lot* of code making
unwarranted assumptions about the underlying type of enums, and it
doesn't seem entirely reasonable to eagerly break all of it.
Much more importantly, the current state of affairs is *very* good at
optimizing based upon this information, which causes failures that are
very distant from the actual enum. Before we push for enabling this by
default, I think we need to implement -fcatch-undefined-behavior support
for instrumenting and trapping whenever we store or load a value outside
of the range. That way we can track down the misbehaving code very
quickly.
I discussed this with Rafael, and currently the only important cases he
is aware of are the bool range-based optimizations which are staying
hard enabled. We've not seen any issue with those either, and they are
much more important for performance.
llvm-svn: 153550
|
| |
|
|
|
|
|
|
|
| |
completion item. For example, if the code completion itself represents
a declaration in a namespace (say, std::vector), then this API
retrieves the cursor kind and name of the namespace (std). Implements
<rdar://problem/11121951>.
llvm-svn: 153545
|
| |
|
|
|
|
|
| |
necessarily mean we've found a function declarator. If the next token is not
a ')', this is actually a parenthesized pack expansion.
llvm-svn: 153544
|
| |
|
|
|
|
| |
// rdar://11124775
llvm-svn: 153535
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The analyzer gives up path exploration under certain conditions. For
example, when the same basic block has been visited more than 4 times.
With inlining turned on, this could lead to decrease in code coverage.
Specifically, if we give up inside the inlined function, the rest of
parent's basic blocks will not get analyzed.
This commit introduces an option to enable re-run along the failed path,
in which we do not inline the last inlined call site. This is done by
enqueueing the node before the processing of the inlined call site
with a special policy encoded in the state. The policy tells us not to
inline the call site along the path.
This lead to ~10% increase in the number of paths analyzed. Even though
we expected a much greater coverage improvement.
The option is turned off by default for now.
llvm-svn: 153534
|
| |
|
|
|
|
|
|
|
| |
Report root function name with exhausted block diagnostic.
Also, use stack frames, not just any location context when checking if
the basic block is in the same context.
llvm-svn: 153532
|
| |
|
|
|
|
|
|
| |
analyzes.
(This method can be called twice on the same function.)
llvm-svn: 153531
|
| |
|
|
|
|
| |
Patch by Jack Carter.
llvm-svn: 153530
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expansions, e.g
"#include MACRO(STUFF)".
-As an inclusion position for the included file, use the file location of the file where it
was included but *after* the macro expansions. We want the macro expansions to be considered
as before-in-translation-unit for everything in the included file.
-In the preprocessing record take into account that only inclusion directives can be encountered
as "out-of-order" (by comparing the start of the range which for inclusions is the hash location)
and use binary search if there is an extreme number of macro expansions in the include directive.
Fixes rdar://11111779
llvm-svn: 153527
|
| |
|
|
|
|
| |
// rdar://11124354
llvm-svn: 153526
|
| |
|
|
| |
llvm-svn: 153523
|
| |
|
|
|
|
|
|
| |
list of identifiers that that 'public' names at the end of the
translation unit, e.g., defined macros or identifiers with top-level
names, in sorted order. Meant to support <rdar://problem/10921596>.
llvm-svn: 153522
|
| |
|
|
|
|
| |
same. pr12357.
llvm-svn: 153515
|
| |
|
|
|
|
| |
case that I forgot to check in.
llvm-svn: 153512
|
| |
|
|
|
|
|
| |
isConstructorDeclaration also needs updating for any extension to the
grammar of a direct-declarator.
llvm-svn: 153490
|
| |
|
|
|
|
|
|
|
|
|
|
| |
assigned to a struct. This is fallout from inlining results, which expose
far more patterns where people stuff CF objects into structs and pass them
around (and we can reason about it). The problem is that we don't have
a general way to detect when values have escaped, so as an intermediate step
we need to eagerly prune out such tracking.
Fixes <rdar://problem/11104566>.
llvm-svn: 153489
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
constructor, but X is not a known typename, check whether the tokens could
possibly match the syntax of a declarator before concluding that it isn't
a constructor. If it's definitely ill-formed, assume it is a constructor.
Empirical evidence suggests that this pattern is much more often a
constructor with a typoed (or not-yet-declared) type name than any of the
other possibilities, so the extra cost of the check is not expected to be
problematic.
llvm-svn: 153488
|
| |
|
|
|
|
|
|
|
|
|
|
| |
1. Don't short-circuit conditional statements that are checking flags.
Otherwise, the driver emits warnings about unused arguments.
2. -mkernel and -fapple-kext imply no exceptions, so claim exception related
arguments now to avoid warnings about unused arguments.
rdar://11120518
llvm-svn: 153478
|
| |
|
|
|
|
|
| |
argument warning.
Part of rdar://11120518
llvm-svn: 153470
|
| |
|
|
|
|
|
| |
argument warning.
Part of rdar://11120518
llvm-svn: 153469
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unscoped enumeration members: an enumerator name which is visible in the
out-of-class definition of a member of a templated class might not actually
exist in the instantiation of that class, if the enumeration is also lexically
defined outside the class definition and is explicitly specialized.
Depending on the result of a CWG discussion, we may have a different resolution
for a class of problems in this area, but this fixes the immediate issue of a
crash-on-invalid / accepts-invalid (depending on +Asserts). Thanks to Johannes
Schaub for digging into the standard wording to find how this case is currently
specified to behave.
llvm-svn: 153461
|
| |
|
|
|
|
| |
fails in testing.
llvm-svn: 153454
|
| |
|
|
| |
llvm-svn: 153453
|
| |
|
|
| |
llvm-svn: 153447
|
| |
|
|
|
|
|
| |
This makes sense because chunk's ctor is also out of line and simplifies considerably
when inlined with a constant parameter. Shrinks clang on i386-linux-Release+Asserts by 65k.
llvm-svn: 153446
|
| |
|
|
|
|
|
| |
typo correction to introduce a nested-name-specifier; we aren't
prepared to handle it here. Fixes PR12297 / <rdar://problem/11075219>.
llvm-svn: 153445
|
| |
|
|
|
|
| |
symbols. // rdar://11103982
llvm-svn: 153443
|
| |
|
|
|
|
|
|
| |
InjectedClassNameType; otherwise, it won't be properly wired to the
original (canonical) declaration when it is deserialized. Fixes
<rdar://problem/11112464>.
llvm-svn: 153442
|
| |
|
|
|
|
|
|
|
|
| |
Due to lack of move semantics we would create a temporary std::string from the
string literal, copy it into the vector and discard the temporary. This leads
to massive code bloat, optimizing it saves 50k on i386-linux-Release+Asserts.
While there add a two-element overload for push_back, simplifying code a bit.
llvm-svn: 153441
|
| |
|
|
|
|
|
|
|
| |
std::list is expensive, but so is std::sorting a SmallVector of SmallVectors of
heavyweight PartialDiagnostics.
Saves ~30k in a i386-linux-Release+Asserts clang build.
llvm-svn: 153437
|
| |
|
|
|
|
|
| |
templated functions. Build a redeclaration chain, and only instantiate the
definition of the enum when visiting the defining declaration.
llvm-svn: 153427
|
| |
|
|
|
|
| |
enumerations in templates until the template is instantiated.
llvm-svn: 153426
|
| |
|
|
|
|
| |
possibly even a regression for known bad versions), I'm reverting it.
llvm-svn: 153420
|
| |
|
|
|
|
|
|
| |
regular expression instead.
Patch thanks to Nikola Smiljanic
llvm-svn: 153413
|
| |
|
|
|
|
| |
map.
llvm-svn: 153407
|
| |
|
|
|
|
| |
evaluateAsBooleanConditionNoCache(S) might update the map and invalidate the iterator.
llvm-svn: 153406
|
| |
|
|
| |
llvm-svn: 153389
|
| |
|
|
|
|
| |
used in modern objc translator. // rdar://11105680
llvm-svn: 153386
|
| |
|
|
|
|
| |
fields in _class_ro_t metadata. // rdar://11079898
llvm-svn: 153384
|
| |
|
|
|
|
| |
Thanks to NAKAMURA Takumi for finding it!
llvm-svn: 153383
|
| |
|
|
|
|
|
|
|
|
| |
metadata in clang for booleans and".
For i686 targets (eg. cygwin), I saw "Range must not be empty!" in verifier.
It produces (i32)[0x80000000:0x80000000) from (uint64_t)[0xFFFFFFFF80000000ULL:0x0000000080000000ULL), for signed i32 on MDNode::Range.
llvm-svn: 153382
|
| |
|
|
|
|
| |
we get the right realloc()!
llvm-svn: 153370
|
| |
|
|
|
|
|
|
|
|
| |
the report configuration while walking the path.
This required adding a change count token to BugReport, but also allowed us to ditch ImmutableList as the BugReporterVisitor data type.
Also, remove the hack from MallocChecker, now that visitors appear in the opposite order. This is not exactly a fix, but the common case -- custom diagnostics after generic ones -- is now the default behavior.
llvm-svn: 153369
|
| |
|
|
|
|
| |
to reset diagnostic generation.
llvm-svn: 153368
|
| |
|
|
|
|
|
|
|
| |
recover by returning the statements that we parsed so far, instead of
dropping the whole function body.
rdar://10967343
llvm-svn: 153367
|
| |
|
|
|
|
| |
c++ enums.
llvm-svn: 153360
|
| |
|
|
|
|
| |
some calling code to actually pass in a non-null type, to avoid a crash.
llvm-svn: 153358
|
| |
|
|
| |
llvm-svn: 153356
|
| |
|
|
|
|
| |
just because there was an attribute in front of it.
llvm-svn: 153355
|
| |
|
|
|
|
|
| |
a previous declaration if the redeclaration is invalid. That way lies madness.
Fixes a crash-on-invalid reported by Abramo.
llvm-svn: 153349
|