| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 139078
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
well.
Also, clean up the flow of the code a bit, and factor things more
nicely.
Finally, add the test case that was missing from my previous
commit (sorry), with new tests added to cover temporaries and other fun
cases.
llvm-svn: 139077
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reference members of classes. We've had several bugs reported because of
this, and there's no reason not to flag it right away in the compiler.
Comments especially welcome on the strategy for implementing this
warning (IE, what should trigger this?) and on the text of the warning
itself.
I'm going to extend this to cover obvious cases with temporaries and
beef up the test cases some in subsequent patches. I'll then run it over
a large codebase and make sure its not misbehaving before I add it to
-Wall or turn it on by default. I think this one might be a good
candidate for on by default.
llvm-svn: 139075
|
| |
|
|
| |
llvm-svn: 139042
|
| |
|
|
| |
llvm-svn: 139033
|
| |
|
|
|
|
| |
Fix the cast kind for a cast from floating-point to enum type. (The difference isn't actually visible, but that's just because IRGen is overly forgiving.) Per report by Enea Zaffanella on cfe-dev.
llvm-svn: 139011
|
| |
|
|
|
|
| |
NULL as a non-pointer in a binary operation into separate functions.
llvm-svn: 138995
|
| |
|
|
| |
llvm-svn: 138994
|
| |
|
|
|
|
| |
checking functions, into its own function.
llvm-svn: 138993
|
| |
|
|
|
|
| |
functions making a slimmer function.
llvm-svn: 138992
|
| |
|
|
|
|
| |
hard coding strings from SemaExpr.cpp to DiagnosticSemaKinds.td.
llvm-svn: 138987
|
| |
|
|
|
|
|
|
| |
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).
llvm-svn: 138985
|
| |
|
|
|
|
| |
CheckIncrementDecrementOperand() in SemaExpr.cpp to move reused code to separate functions.
llvm-svn: 138975
|
| |
|
|
|
|
| |
in the face of buffering C++/ObjC method bodies.
llvm-svn: 138972
|
| |
|
|
|
|
|
|
|
| |
itself upon initialization, such as using itself within its own copy constructor.
struct S {};
S s(s);
llvm-svn: 138969
|
| |
|
|
|
|
|
|
| |
semantic analysis when taking the address of an xvalue. Instead, just
build the unary operator directly, since it's safe to do so (from the
IRgen and AST perspectives) for any glvalue. Fixes PR10822.
llvm-svn: 138935
|
| |
|
|
|
|
|
|
|
|
| |
synthesis. This new feature is currently placed under
-fobjc-default-synthesize-properties option
and is off by default pending further testing.
It will become the default feature soon.
// rdar://8843851
llvm-svn: 138913
|
| |
|
|
|
|
|
|
| |
message send to an unknown method.
rdar://problem/9416370, redux.
llvm-svn: 138893
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
and does the Sema on their body after the entire
class/category @implementation is seen. This change allows messaging
of forward private methods, as well as, access to
synthesized ivars of properties with foward synthesize
declarations; among others. In effect, this patch removes
several restrictions placed on objective-c due to in-place
semantics processing of methods.
This is part of // rdar://8843851.
llvm-svn: 138865
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the function in question when applicable (that is, not for blocks).
Patch by Joerg Sonnenberger with some stylistic tweaks by me.
When discussing this weth Joerg, streaming the decl directly into the
diagnostic didn't work because we have a pointer-to-const, and the
overload doesn't accept such. In order to make my style tweaks to the
patch, I first changed the overload to accept a pointer-to-const, and
then changed the diagnostic printing layer to also use
a pointer-to-const, cleaning up a gross line of code along the way.
llvm-svn: 138854
|
| |
|
|
|
|
|
|
|
| |
collision between C99 hexfloats and C++0x user-defined literals by
giving C99 hexfloats precedence. Also, warning about user-defined
literals that conflict with hexfloats and those that have names that
are reserved by the implementation. Fixes <rdar://problem/9940194>.
llvm-svn: 138839
|
| |
|
|
|
|
| |
aren't considered narrowing conversions.
llvm-svn: 138838
|
| |
|
|
|
|
|
|
|
| |
This makes the code duplication of implicit special member handling even worse,
but the cleanup will have to come later. For now, this works.
Follow-up with tests for explicit defaulting and enabling the __has_feature
flag to come.
llvm-svn: 138821
|
| |
|
|
|
|
|
|
|
|
|
| |
Remove
-setClassInterface
-setNextClassCategory
-insertNextClassCategory
and combine them in the Create function.
llvm-svn: 138817
|
| |
|
|
| |
llvm-svn: 138815
|
| |
|
|
|
|
|
| |
Doing this happens to disrupt the pattern that ARC was looking for
for move optimizations, so we need to fix that simultaneously.
llvm-svn: 138789
|
| |
|
|
|
|
| |
argument deduction
llvm-svn: 138787
|
| |
|
|
|
|
| |
Johannes Schaub for talking me around to sense.
llvm-svn: 138784
|
| |
|
|
| |
llvm-svn: 138776
|
| |
|
|
|
|
| |
annotations. We identify situations where we are accessing (reading or writing) guarded variables, and report an error if the appropriate locks are not held.
llvm-svn: 138774
|
| |
|
|
|
|
| |
No change in functionality.
llvm-svn: 138742
|
| |
|
|
|
|
| |
This patch is by DeLesley Hutchins.
llvm-svn: 138738
|
| |
|
|
|
|
|
|
|
| |
qualification of a type doesn't affect whether a conversion is a narrowing
conversion.
This doesn't work in template cases because SubstTemplateTypeParmType gets in
the way.
llvm-svn: 138735
|
| |
|
|
|
|
| |
This matches gcc's logic. Second half of PR10661.
llvm-svn: 138730
|
| |
|
|
|
|
|
|
|
|
|
| |
to varargs functions in unevaluated contexts. AFAICT, there is no
standards justification for this, but it matches what other compilers do
and therefore preserves compatibility with certain template metaprogramming
idioms.
Should fix self-host.
llvm-svn: 138715
|
| |
|
|
|
|
|
| |
to class implementation where it is supposed to be
implemented. // rdar://10009982.
llvm-svn: 138714
|
| |
|
|
|
|
|
|
|
|
| |
, such as list of forward @class decls, in a DeclGroup
node. Deal with its consequence throught clang. This
is in preparation for more Sema work ahead. // rdar://8843851.
Feel free to reverse if it breaks something important
and I am unavailable.
llvm-svn: 138709
|
| |
|
|
|
|
|
| |
of default argument promotion and needs to happen unconditionally.
This is particularly semantically important in C++0x.
llvm-svn: 138691
|
| |
|
|
|
|
| |
pointer variable. Patch by David Blaikie!
llvm-svn: 138687
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
loads the named module. The syntax itself is intentionally hideous and
will be replaced at some later point with something more
palatable. For now, we're focusing on the semantics:
- Module imports are handled first by the preprocessor (to get macro
definitions) and then the same tokens are also handled by the parser
(to get declarations). If both happen (as in normal compilation),
the second one is redundant, because we currently have no way to
hide macros or declarations when loading a module. Chris gets credit
for this mad-but-workable scheme.
- The Preprocessor now holds on to a reference to a module loader,
which is responsible for loading named modules. CompilerInstance is
the only important module loader: it now knows how to create and
wire up an AST reader on demand to actually perform the module load.
- We search for modules in the include path, using the module name
with the suffix ".pcm" (precompiled module) for the file name. This
is a temporary hack; we hope to improve the situation in the
future.
llvm-svn: 138679
|
| |
|
|
|
|
|
| |
finding life-time conflict with its declared ivar.
// rdar://10007230
llvm-svn: 138659
|
| |
|
|
|
|
| |
PR10766.
llvm-svn: 138648
|
| |
|
|
|
|
| |
deleted operators. Fixes PR10757.
llvm-svn: 138645
|
| |
|
|
|
|
|
| |
the crazy comma expression so that we get an r-value in the
varargs position.
llvm-svn: 138638
|
| |
|
|
|
|
| |
bridged cast. Noticed by AST inspection by Ted Kremenek!
llvm-svn: 138616
|
| |
|
|
|
|
|
|
| |
Much to everyone's surprise, the default constructor for TypeResult produces
an instance with Invalid == false. This seems like a decision we may want to
revisit.
llvm-svn: 138601
|
| |
|
|
|
|
|
| |
declated method in the class belongs to a synthesized
property getter/setter. // rdar://10014946
llvm-svn: 138598
|
| |
|
|
|
|
|
|
|
| |
from the given source. -emit-module behaves similarly to -emit-pch,
except that Sema is somewhat more strict about the contents of
-emit-module. In the future, there are likely to be more interesting
differences.
llvm-svn: 138595
|
| |
|
|
|
|
| |
changes. // rdar://10015110
llvm-svn: 138594
|
| |
|
|
| |
llvm-svn: 138584
|