| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
reference.
Under ARC++, a reference to a const Objective-C pointer is implicitly
treated as __unsafe_unretained, and can be initialized with (e.g.) a
__strong lvalue. Make sure this behavior does not break template
argument deduction and (related) that partial ordering still prefers a
'T* const&' template over a 'T const&' template when this case kicks
in. Fixes <rdar://problem/14467941>.
llvm-svn: 194239
|
|
|
|
|
|
| |
last patch.
llvm-svn: 194238
|
|
|
|
| |
llvm-svn: 194237
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This syntactic checker looks for expressions on both sides of comparison
operators that are structurally the same. As a special case, the
floating-point idiom "x != x" for "isnan(x)" is left alone.
Currently this only checks comparison operators, but in the future we could
extend this to include logical operators or chained if-conditionals.
Checker by Per Viberg!
llvm-svn: 194236
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An Objective-C for-in loop will have zero iterations if the collection is
empty. Previously, we could only detect this case if the program asked for
the collection's -count /before/ the for-in loop. Now, the analyzer
distinguishes for-in loops that had zero iterations from those with at
least one, and can use this information to constrain the result of calling
-count after the loop.
In order to make this actually useful, teach the checker that methods on
NSArray, NSDictionary, and the other immutable collection classes don't
change the count.
<rdar://problem/14992886>
llvm-svn: 194235
|
|
|
|
|
|
|
|
|
|
| |
The path note that says "Loop body executed 0 times" has been changed to
"Loop body skipped when range is empty" for C++11 for-range loops, and to
"Loop body skipped when collection is empty" for Objective-C for-in loops.
Part of <rdar://problem/14992886>
llvm-svn: 194234
|
|
|
|
|
|
|
|
| |
NS_RETURNS_INNER_POINTER ends up unintentionally
on the @property under -objcmt-migrate-all
// rdar://15396636
llvm-svn: 194233
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
llvm::ArrayRef of arguments rather than taking
a fixed number of possibly-NULL pointers to
arguments.
Also changed ClangFunction::GetThreadPlanToCallFunction
to take the address of the argument struct by value
instead of by reference, since it doesn't actually
modify the value passed into it.
llvm-svn: 194232
|
|
|
|
|
|
|
|
| |
Produces neater IR in significantly less time.
(~18% faster -O0 compile time for sqlite3 with -fsanitize=undefined)
llvm-svn: 194231
|
|
|
|
| |
llvm-svn: 194230
|
|
|
|
| |
llvm-svn: 194229
|
|
|
|
| |
llvm-svn: 194228
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This tool is for interactive exploration of the Clang AST using AST matchers.
It currently allows the user to enter a matcher at an interactive prompt
and view the resulting bindings as diagnostics, AST pretty prints or AST
dumps. Example session:
$ cat foo.c
void foo(void) {}
$ clang-query foo.c --
clang-query> match functionDecl()
Match #1:
foo.c:1:1: note: "root" binds here
void foo(void) {}
^~~~~~~~~~~~~~~~~
1 match.
Differential Revision: http://llvm-reviews.chandlerc.com/D2098
llvm-svn: 194227
|
|
|
|
| |
llvm-svn: 194226
|
|
|
|
|
|
|
|
|
|
|
|
| |
The preprocessor currently recognizes module declarations to load a
module based on seeing the 'import' keyword followed by an
identifier. This sequence is fairly unlikely in C (one would need a
type named 'import'), but is more common in Objective-C (where a
variable named 'import' can cause problems). Since import declarations
currently require a leading '@', recognize that in the preprocessor as
well. Fixes <rdar://problem/15084587>.
llvm-svn: 194225
|
|
|
|
|
|
|
|
|
| |
When performing an Objective-C message send to a value of class type,
perform a contextual conversion to an Objective-C pointer type. We've
had this for a long time, but it recently regressed. Fixes
<rdar://problem/15234703>.
llvm-svn: 194224
|
|
|
|
|
|
| |
Differential Revision: http://llvm-reviews.chandlerc.com/D2115
llvm-svn: 194223
|
|
|
|
|
|
| |
Differential Revision: http://llvm-reviews.chandlerc.com/D2114
llvm-svn: 194222
|
|
|
|
|
|
|
| |
No additional test was needed, Other/constant-fold-gep.ll detects this
just fine.
llvm-svn: 194221
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Consider a GEP of:
i8* getelementptr ({ [2 x i8], i32, i8, [3 x i8] }* @main.c, i32 0, i32 0, i64 0)
If we proceeded to GEP the aforementioned object by 8, would form a GEP of:
i8* getelementptr ({ [2 x i8], i32, i8, [3 x i8] }* @main.c, i32 0, i32 0, i64 8)
Note that we would go through the first array member, causing an
out-of-bounds accesses. This is problematic because we might get fooled
if we are trying to evaluate loads using this GEP, for example, based
off of an object with a constant initializer where the array is zero.
This fixes PR17732.
Reviewers: nicholas, chandlerc, void
Reviewed By: void
CC: llvm-commits, echristo, void, aemerson
Differential Revision: http://llvm-reviews.chandlerc.com/D2093
llvm-svn: 194220
|
|
|
|
| |
llvm-svn: 194219
|
|
|
|
|
|
|
|
|
|
| |
The BlockAddress doesn't have access to the correct basic blocks until the
functions have been cloned. This causes the BlockAddress to point to the old
values. Just wait until the functions have been cloned before copying the
initializers.
PR13163
llvm-svn: 194218
|
|
|
|
|
|
|
| |
to avoid breaking AST invariants by reusing Stmt nodes within the same
function.
llvm-svn: 194217
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
#define M(NAME) assert(!Context.Verifying &&#NAME);
After:
#define M(NAME) assert(!Context.Verifying && #NAME);
This fixes llvm.org/PR16156.
llvm-svn: 194216
|
|
|
|
| |
llvm-svn: 194215
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
[self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa |
aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa |
aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa];
[self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa];
After:
[self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa |
aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa |
aaaaaaaaaaaaaaa | aaaaaaaaaaaaaaa];
[self aaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaa, aaaaaaaaaaaaaaa];
This addresses llvm.org/PR15349 and llvm.org/PR16185.
llvm-svn: 194214
|
|
|
|
|
|
| |
forget to clean up temporaries at the end of it.
llvm-svn: 194213
|
|
|
|
| |
llvm-svn: 194212
|
|
|
|
| |
llvm-svn: 194211
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
Constructor()
: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaa(aaaa,
aaaa)) {}
After:
Constructor()
: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaa(aaaa, aaaa)) {}
llvm-svn: 194210
|
|
|
|
|
|
|
|
| |
As a side-effect, constructors definitions will correctly be recognized
and formatted as function declarations. Tests will be added in a
follow-up patch actually using the correct recognition.
llvm-svn: 194209
|
|
|
|
|
|
| |
that it gets into the binary.
llvm-svn: 194208
|
|
|
|
| |
llvm-svn: 194207
|
|
|
|
|
|
|
|
| |
obviously >= 0 ;)
Also - others have complained about some white space issues - sorry about that - continues to be a pain point for me - will try and see what I can do with clang-format this evening after work - as a short term fix, if anyone can email me the files that they have already identified with issues, it would help me speed up a focused fix. sorry.
llvm-svn: 194206
|
|
|
|
| |
llvm-svn: 194205
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
Constructor::Constructor()
: some_value{ //
aaaaaaa //
} {}
After:
Constructor::Constructor()
: some_value{ //
aaaaaaa //
} {}
llvm-svn: 194204
|
|
|
|
| |
llvm-svn: 194203
|
|
|
|
|
|
| |
field with a more appropriate name
llvm-svn: 194202
|
|
|
|
|
|
|
|
| |
of being converted and this path is not relevant to anything at this time
so I have just disabled it for a few days while I'm at the LLVM conference
and don't have time to complete it or properly fix it.
llvm-svn: 194201
|
|
|
|
| |
llvm-svn: 194200
|
|
|
|
|
|
|
|
|
|
| |
CMake changes to build the ASan runtime for the iOS simulator. This is a universal library targeting the same architectures as the OSX ASan runtime does, thus the iossim version can't live in the same universal libclang_rt.asan_osx_dynamic.dylib
The difference between the OSX and iossim builds is in the -mios-simulator-version-min and -ios_simulator_version_min flags that tell Clang to compile and link iossim code.
The iossim runtime can only be built on a machine with both Xcode and the iOS Simulator SDK installed. If xcodebuild -version -sdk iphonesimulator Path returns a nonempty path, it is used when compiling and linking the iossim runtime.
llvm-svn: 194199
|
|
|
|
|
|
| |
Add its support in Clang
llvm-svn: 194198
|
|
|
|
| |
llvm-svn: 194197
|
|
|
|
| |
llvm-svn: 194196
|
|
|
|
| |
llvm-svn: 194195
|
|
|
|
|
|
| |
for C++17.
llvm-svn: 194194
|
|
|
|
|
|
| |
all platforms. No functionality change.
llvm-svn: 194193
|
|
|
|
| |
llvm-svn: 194192
|
|
|
|
|
|
| |
This hasn't been used for some time.
llvm-svn: 194191
|
|
|
|
| |
llvm-svn: 194190
|