| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
llvm-svn: 165459
|
| |
|
|
|
|
|
|
|
|
| |
of the initializer is valid before using it.
Fixes rdar://12455002&12449015 where local variables of objc objects in ARC mode
were not annotated because of the ImplicitValueInitExpr initializer having invalid
source range, resulting in the SourceRange of the VarDecl having invalid end location.
llvm-svn: 165456
|
| |
|
|
|
|
|
|
|
| |
With this patch Bitrig can use a different c++ library without pain and
within the normal commandline parameters.
Original patch by David Hill, with lots of fixes and cleanup by me.
llvm-svn: 165430
|
| |
|
|
| |
llvm-svn: 165384
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The darwin change should be a nop since Triple::getArchTypeForDarwinArchName
doesn't know about amd64.
If things like amd64-mingw32 are to be rejected, we should print a error
earlier on instead of silently using the wrong abi.
Remove old comment that looks out of place, this is "in clang".
llvm-svn: 165368
|
| |
|
|
|
|
|
| |
GCC has always supported this on PowerPC and 4.8 supports it on all platforms,
so it's a good idea to expose it in clang too. LLVM supports this on all targets.
llvm-svn: 165362
|
| |
|
|
|
|
| |
This should fix the bots.
llvm-svn: 165358
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Clang ASTs are a DAG, not a pure tree. However, ParentMap has to
choose a single parent for each object. In the main (only?) cases in
which the AST forms a DAG, it protects from multiple traversal by using
OpaqueValueExprs. Previously, ParentMap would just unconditionally look
through all OpaqueValueExprs when building its map.
In order to make this behavior better for the analyzer's diagnostics,
ParentMap was changed to not set a statement's parent if there already
was one in the map. However, ParentMap is supposed to allow updating
existing mappings by calling addStmt once again. This change makes the
"transparency" of OpaqueValueExprs explicit, and disables it when it
is not desired, rather than checking the current contents of the map.
This new code seems like a big change, but it should actually have
essentially the same performance as before. Only OpaqueValueExprs and
their users (PseudoObjectExpr and BinaryConditionalOperator) will
have any different behavior.
There should be no user-visible functionality change, though a test
has been added for the current behavior of BinaryConditionalOperator
source locations and accompanying Xcode arrows (which are not so great...).
llvm-svn: 165355
|
| |
|
|
|
|
|
|
|
|
|
| |
Some implicit statements, such as the implicit 'self' inserted for "free"
Objective-C ivar access, have invalid source locations. If one of these
statements is the location where an issue is reported, we'll now look at
the enclosing statements for a valid source location.
<rdar://problem/12446776>
llvm-svn: 165354
|
| |
|
|
| |
llvm-svn: 165347
|
| |
|
|
| |
llvm-svn: 165345
|
| |
|
|
| |
llvm-svn: 165343
|
| |
|
|
| |
llvm-svn: 165342
|
| |
|
|
| |
llvm-svn: 165339
|
| |
|
|
| |
llvm-svn: 165329
|
| |
|
|
| |
llvm-svn: 165325
|
| |
|
|
|
|
| |
PR14029, clang part.
llvm-svn: 165289
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This appears to be consistent with GCC's implementation of the same warning
under -Wparentheses. Suppressing a << b + c for cases where 'a' is a user
defined type for compatibility with C++ stream IO. Otherwise suggest
parentheses around the addition or subtraction subexpression.
(this came up when MSVC was complaining (incorrectly, so far as I can tell)
about a perceived violation of this within the LLVM codebase, PR14001)
llvm-svn: 165283
|
| |
|
|
| |
llvm-svn: 165276
|
| |
|
|
|
|
|
|
| |
- outside C++, return undef (behavior is not undefined unless the value is used)
- in C++, with -fcatch-undefined-behavior, perform an appropriate trap
- in C++, produce an 'unreachable' (behavior is undefined immediately)
llvm-svn: 165273
|
| |
|
|
|
|
|
|
| |
a non-inline namespace, then reopens it as inline to try to add its symbols to
the surrounding namespace. In this one special case, permit the namespace to be
reopened as inline, and patch up the name lookup tables to match.
llvm-svn: 165263
|
| |
|
|
| |
llvm-svn: 165247
|
| |
|
|
|
|
|
|
|
| |
64-bit PPC SVR4 ABI.
The test verifies passing of structures, items with 16-byte alignment, and
small items that are passed right-justified in the parameter save area slot.
llvm-svn: 165245
|
| |
|
|
|
|
|
|
|
|
|
|
| |
crtfastmath.o contains routines to set the floating point flags to a faster,
unsafe mode. Linking it in speeds up code dealing with denormals significantly
(PR14024).
For now this is only enabled on linux where I can test it and crtfastmath.o is
widely available. We may want to provide a similar file with compiler-rt
eventually and/or enable it on other platforms too.
llvm-svn: 165240
|
| |
|
|
| |
llvm-svn: 165231
|
| |
|
|
| |
llvm-svn: 165196
|
| |
|
|
|
|
|
| |
mess by handling all pragmas which the parser touches uniformly.
<rdar://problem/12248901>, etc.
llvm-svn: 165195
|
| |
|
|
| |
llvm-svn: 165177
|
| |
|
|
| |
llvm-svn: 165175
|
| |
|
|
| |
llvm-svn: 165142
|
| |
|
|
|
|
|
| |
that doesn't have a 'self' as this implicitly captures 'self' and could
create retain cycles. Provide fixit. // rdar://11194874
llvm-svn: 165133
|
| |
|
|
|
|
|
|
|
|
| |
1. Add mipsel-linux-android to the list of valid MIPS target triples.
2. Add <gcc install path>/mips-r2 to the list of toolchain specific path
prefixes if target is mipsel-linux-android.
The patch reviewed by Logan Chien.
llvm-svn: 165131
|
| |
|
|
|
|
| |
and by specifying a target.
llvm-svn: 165130
|
| |
|
|
|
|
|
|
|
|
| |
fast div/rem instruction (for Intel Atom).
Test case for llvm commit 165126.
Patch by Tyler Nowicki.
llvm-svn: 165129
|
| |
|
|
|
|
|
|
|
| |
...and fix the run line so that the expected warnings are the same on
all platforms.
This reverts r165088 / d09074f0ca06626914108f1c0d4e70adeb851e01.
llvm-svn: 165124
|
| |
|
|
| |
llvm-svn: 165118
|
| |
|
|
|
|
| |
Part of PR14005.
llvm-svn: 165117
|
| |
|
|
|
|
| |
Currently, it's ignored if the number of set bits isn't divisible by 4.
llvm-svn: 165116
|
| |
|
|
|
|
| |
regex for version tuples.
llvm-svn: 165104
|
| |
|
|
|
|
|
|
|
|
| |
some builds, on FreeBSD, Linux and Windows.
error: 'warning' diagnostics expected but not seen:
Line 94: types are incompatible
1 error generated.
llvm-svn: 165088
|
| |
|
|
|
|
|
|
| |
- General C++11 attributes were previously parsed and ignored. Now they are parsed and stored in AST.
- Add support to parse arguments of attributes that in 'gnu' namespace.
- Differentiate unknown attributes and known attributes that can't be applied to statements when emitting diagnostic.
llvm-svn: 165082
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In C++, overriding virtual methods are allowed to specify a covariant
return type -- that is, if the return type of the base method is an
object pointer type (or reference type), the overriding method's return
type can be a pointer to a subclass of the original type. The analyzer
was failing to take this into account when devirtualizing a method call,
and anything that relied on the return value having the proper type later
would crash.
In Objective-C, overriding methods are allowed to specify ANY return type,
meaning we can NEVER be sure that devirtualizing will give us a "safe"
return value. Of course, a program that does this will most likely crash
at runtime, but the analyzer at least shouldn't crash.
The solution is to check and see if the function/method being inlined is
the function that static binding would have picked. If not, check that
the return value has the same type. If the types don't match, see if we
can fix it with a derived-to-base cast (the C++ case). If we can't,
return UnknownVal to avoid crashing later.
<rdar://problem/12409977>
llvm-svn: 165079
|
| |
|
|
|
|
|
| |
each one separately, process a stack of MemberExpr's as a single unit so that
static calls and member access will not be warned on.
llvm-svn: 165074
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Uses [[clang::fallthrough]] attribute in a template function, and -Wimplicit-fallthrough to check the attribute presence in an instantiation.
Reviewers: rsmith
Reviewed By: rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D55
llvm-svn: 165068
|
| |
|
|
|
|
| |
attribute going iinto XML document.
llvm-svn: 165066
|
| |
|
|
| |
llvm-svn: 165045
|
| |
|
|
|
|
|
|
|
| |
table, making it printable with the ConfigDump checker. Along the
way, fix a really serious bug where the value was getting parsed
from the string in code that was in an assert() call. This means
in a Release-Asserts build this code wouldn't work as expected.
llvm-svn: 165041
|
| |
|
|
|
|
|
| |
the config string table. Also setup a test for dumping the analyzer
configuration for C++.
llvm-svn: 165040
|
| |
|
|
|
|
| |
to XML output. // rdar://12378879
llvm-svn: 165039
|
| |
|
|
|
|
| |
<rdar://problem/12401423>
llvm-svn: 165029
|