| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The old error message stating that 'begin' was an undeclared identifier
is replaced with a new message explaining that the error is in the range
expression, along with which of the begin() and end() functions was
problematic if relevant.
Additionally, if the range was a pointer type or defines operator*,
attempt to dereference the range, and offer a FixIt if the modified range
works.
llvm-svn: 162248
|
| |
|
|
|
|
|
|
| |
By doing this in the constraint managers, we can ensure that ANY reference
whose value we don't know gets the effect, even if it's not a top-level
parameter.
llvm-svn: 162246
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a flag PrintingPolicy::DontRecurseInDeclContext to provide "terse" output
from DeclPrinter. The motivation is to use DeclPrinter to print declarations
in user-friendly format, without overwhelming user with inner detail of the
declaration being printed.
Also add many tests for DeclPrinter. There are quite a few things that we
print incorrectly: search for WRONG in DeclPrinterTest.cpp -- and these tests
check our output against incorrect output, so that we can fix/refactor/rewrite
the DeclPrinter later.
llvm-svn: 162245
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, when synthesizing an explicitly strong/retain/copy property
of Class type, don't pretend during compatibility checking that the
property is actually assign. Instead, resolve incompatibilities
by secretly changing the type of *implicitly* __unsafe_unretained
Class ivars to be strong. This is moderately evil but better than
what we were doing.
Second, when synthesizing the setter for a strong property of
non-retainable type, be sure to use objc_setProperty. This is
possible when the property is decorated with the NSObject
attribute. This is an ugly, ugly corner of the language, and
we probably ought to deprecate it.
The first is rdar://problem/12039404; the second was noticed by
inspection while fixing the first.
llvm-svn: 162244
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Author: Eric Christopher <echristo@apple.com>
Date: Thu Aug 16 23:50:46 2012 +0000
Add some caching here for the builtin types.
rdar://12117935
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162066 91177308-0d34-0410-b5e6-96231b3b80d8
after fixing a thinko.
llvm-svn: 162243
|
| |
|
|
|
|
|
|
| |
does not return true for all implicit decls currently.
This should fix PR13634 for now, but Decl::isImplicit() should be fixed, too.
llvm-svn: 162238
|
| |
|
|
| |
llvm-svn: 162236
|
| |
|
|
| |
llvm-svn: 162231
|
| |
|
|
|
|
| |
ICE in friend functions.
llvm-svn: 162229
|
| |
|
|
|
|
| |
correctly. PR13643.
llvm-svn: 162226
|
| |
|
|
|
|
|
|
|
|
| |
Also, suggest 'readonly' even if the property has been given an ownership
attribute ('strong', 'weak', etc). This is used when properties are declared
readonly in the public interface but readwrite in a class extension.
<rdar://problem/11500004&11932285>
llvm-svn: 162220
|
| |
|
|
|
|
| |
No functionality change.
llvm-svn: 162216
|
| |
|
|
|
|
|
|
|
|
|
| |
Generating a sink is significantly different behavior from generating a
normal node, and a simple boolean parameter can be rather opaque. Per
offline discussion with Anna, adding new generation methods is the
clearest way to communicate intent.
No functionality change.
llvm-svn: 162215
|
| |
|
|
| |
llvm-svn: 162212
|
| |
|
|
| |
llvm-svn: 162210
|
| |
|
|
|
|
|
|
|
|
|
| |
Forgetting to at least cast the result was giving us Loc/NonLoc problems
in SValBuilder (hitting an assertion). But the standard (both C and C++)
does actually guarantee that && and || will result in the actual values
1 and 0, typed as 'int' in C and 'bool' in C++, and we can easily model that.
PR13461
llvm-svn: 162209
|
| |
|
|
| |
llvm-svn: 162198
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Debug builds, VerifyDiagnosticConsumer checks any files with diagnostics
to make sure we got the chance to parse them for directives (expected-warning
and friends). This check previously relied on every parsed file having a
FileEntry, which broke the cling interpreter's test suite.
This commit changes the extra debug checking to mark a file as unparsed
as soon as we see a diagnostic from that file. At the very end, any files
that are still marked as unparsed are checked for directives, and a fatal
error is emitted (as before) if we find out that there were directives we
missed. -verify directives should always live in actual parsed files, not
in PCH or AST files.
Patch by Andy Gibbs, with slight modifications by me.
llvm-svn: 162171
|
| |
|
|
|
|
|
| |
always yield a positive number. Just print the negated result as an
unsigned number.
llvm-svn: 162163
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nested names as id-expressions, using the annot_primary_expr annotation, where
possible. This removes some redundant lookups, and also allows us to
typo-correct within tentative parsing, and to carry on disambiguating past an
identifier which we can determine will fail lookup as both a type and as a
non-type, allowing us to disambiguate more declarations (and thus offer
improved error recovery for such cases).
This also introduces to the parser the notion of a tentatively-declared name,
which is an identifier which we *might* have seen a declaration for in a
tentative parse (but only if we end up disambiguating the tokens as a
declaration). This is necessary to correctly disambiguate cases where a
variable is used within its own initializer.
llvm-svn: 162159
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our current handling of 'throw' is all CFG-based: it jumps to a 'catch' block
if there is one and the function exit block if not. But this doesn't really
get the right behavior when a function is inlined: execution will continue on
the caller's side, which is always the wrong thing to do.
Even within a single function, 'throw' completely skips any destructors that
are to be run. This is essentially the same problem as @finally -- a CFGBlock
that can have multiple entry points, whose exit points depend on whether it
was entered normally or exceptionally.
Representing 'throw' as a sink matches our current (non-)handling of @throw.
It's not a perfect solution, but it's better than continuing analysis in an
inconsistent or even impossible state.
<rdar://problem/12113713>
llvm-svn: 162157
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The CFG approximates @throw as a return statement, but that's not good
enough in inlined functions. Moreover, since Objective-C exceptions are
usually considered fatal, we should be suppressing leak warnings like we
do for calls to noreturn functions (like abort()).
The comments indicate that we were probably intending to do this all along;
it may have been inadvertantly changed during a refactor at one point.
llvm-svn: 162156
|
| |
|
|
|
|
|
|
|
|
| |
This was once an adapter class between callbacks that had CheckerContexts
and those that don't, but for a while now it's essentially just been a
wrapper around a ProgramPointTag. We can just pass the tag around instead.
No functionality change.
llvm-svn: 162155
|
| |
|
|
|
|
|
|
|
| |
We shouldn't be reinventing our own wheels. This also paves the way for
marking different kinds of sinks.
No functionality change.
llvm-svn: 162154
|
| |
|
|
|
|
|
|
| |
Make isa part of objc_object at metadata generation time.
Noticed on inspection.
llvm-svn: 162145
|
| |
|
|
|
|
| |
Sema::ActOnEndOfTranslationUnit(). This is a (minor) optimization.
llvm-svn: 162144
|
| |
|
|
|
|
|
|
| |
specifier is unsed in a declaration; as it may not make the symbol
local to linkage unit as intended. Suggest using "hidden" visibility
attribute instead. // rdar://7703982
llvm-svn: 162138
|
| |
|
|
| |
llvm-svn: 162134
|
| |
|
|
|
|
| |
pollute SemaStmt with extraneous asm handling logic.
llvm-svn: 162132
|
| |
|
|
|
|
|
| |
- The SDKROOT environment variable is the de facto way to set the default SDK
for a number of tools, join forces with them.
llvm-svn: 162116
|
| |
|
|
| |
llvm-svn: 162110
|
| |
|
|
|
|
|
| |
on unsafe cast of a c-function call. This is
a C-only option.
llvm-svn: 162109
|
| |
|
|
|
|
| |
instruction, not emitting them, so a NullStream is fine.
llvm-svn: 162105
|
| |
|
|
|
|
|
| |
Initializing a reference with itself, e.g. "int &a = a;" seems like a
very bad idea.
llvm-svn: 162093
|
| |
|
|
|
|
|
| |
literals match the spacing introduced by the ObjC modernizer. Fixes
the rest of <rdar://problem/11889572>.
llvm-svn: 162084
|
| |
|
|
|
|
|
|
| |
both a waste of time, and prone to crash due to the use of the
error-recovery path in parser. Fixes <rdar://problem/12103608>, which
has been driving me nuts.
llvm-svn: 162081
|
| |
|
|
|
|
| |
bots back.
llvm-svn: 162080
|
| |
|
|
|
|
|
|
| |
reference, so &* on an empty WeakVH binds a reference to a dereferenced null
pointer. So don't do that; we have a perfectly good implicit conversion to
Value*.
llvm-svn: 162079
|
| |
|
|
|
|
| |
misaligned reads throughout the file. Bump PTH format version to 10.
llvm-svn: 162076
|
| |
|
|
|
|
| |
of silently dropping it on the floor.
llvm-svn: 162075
|
| |
|
|
|
|
|
| |
class templates. This fixes misalignment issues in llvm/Support/Endian.h when
built by Clang.
llvm-svn: 162074
|
| |
|
|
|
|
| |
diagnostic before we have a source manager.
llvm-svn: 162070
|
| |
|
|
|
|
|
| |
elaborated type specifier in template instantiation: such a specifier is always
valid because it must be specified within the definition of the type.
llvm-svn: 162068
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
function arguments and arguments for variadic functions are of a particular
type which is determined by some other argument to the same function call.
Usecases include:
* MPI library implementations, where these attributes enable checking that
buffer type matches the passed MPI_Datatype;
* for HDF5 library there is a similar usecase as MPI;
* checking types of variadic functions' arguments for functions like
fcntl() and ioctl().
llvm-svn: 162067
|
| |
|
|
|
|
| |
rdar://12117935
llvm-svn: 162066
|
| |
|
|
|
|
| |
current available documentation.
llvm-svn: 162065
|
| |
|
|
|
|
| |
constraints we don't recognize.
llvm-svn: 162064
|
| |
|
|
| |
llvm-svn: 162063
|
| |
|
|
|
|
| |
Noticed on inspection.
llvm-svn: 162062
|
| |
|
|
| |
llvm-svn: 162056
|