|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| 
| 
| | auto-synthesized (nonfragile-abi2 specific).
Fixes radar 8251648.
llvm-svn: 109866 | 
| | 
| 
| 
| 
| 
| 
| | variables to those in file scope (nonfragile-abi2).
Fixes radar 8248681.
llvm-svn: 109758 | 
| | 
| 
| 
| 
| 
| 
| | one because we're referencing a variable of type NSString &), the
resulting type is an ObjCObjectPointerType.
llvm-svn: 109753 | 
| | 
| 
| 
| 
| 
| | qualified name. Fixes <rdar://problem/8231724>.
llvm-svn: 109682 | 
| | 
| 
| 
| | llvm-svn: 109537 | 
| | 
| 
| 
| | llvm-svn: 109532 | 
| | 
| 
| 
| 
| 
| | since we aren't going to be calling them ever.
llvm-svn: 109377 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | when the RHS of the ||/&& is ever 0 or 1.  This handles a variety of
creative idioms for "true" used in C programs and fixes many false 
positives at the expense of a few false negatives.  This fixes
rdar://8230351.
llvm-svn: 109314 | 
| | 
| 
| 
| 
| 
| | Radar 8218839.
llvm-svn: 109272 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | them as such. Type::is(Signed|Unsigned|)IntegerType() now return false
for vector types, and new functions
has(Signed|Unsigned|)IntegerRepresentation() cover integer types and
vector-of-integer types. This fixes a bunch of latent bugs.
Patch from Anton Yartsev!
llvm-svn: 109229 | 
| | 
| 
| 
| 
| 
| 
| | of same name. In nonfragile-abi2, lookup accesses a synthesized
ivar. This is a transition warning.  Radar 8225011.
llvm-svn: 109197 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | behavior.  Note that
GCC emits a warning instead of an error when using an unavailable Objective-C protocol, so now
Clang's behavior is more strict in this case, but more consistent.  We will need to see how much
this fires on real code and determine whether this case should be downgraded to a warning.
Fixes <rdar://problem/8213093>.
llvm-svn: 109033 | 
| | 
| 
| 
| | llvm-svn: 108807 | 
| | 
| 
| 
| 
| 
| | and a minor cleanup.
llvm-svn: 108707 | 
| | 
| 
| 
| 
| 
| 
| | incomplete union (PR5692) and incomplete enum, and fixes obscure
accepts-invalid on cast to incomplete struct.
llvm-svn: 108630 | 
| | 
| 
| 
| 
| 
| 
| | part of the new property synthesis by default.
wip.
llvm-svn: 108599 | 
| | 
| 
| 
| 
| 
| 
| | Don't warn about "logically bool" expressions on the RHS,
even if they fold to a constant.
llvm-svn: 108388 | 
| | 
| 
| 
| 
| 
| | as well. Fixes radar 7975788.
llvm-svn: 108333 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | t2.c:2:12: warning: use of logical && with constant operand; switch to bitwise &
      or remove constant [-Wlogical-bitwise-confusion]
  return x && 4;
           ^  ~
wording improvement suggestions are welcome.
llvm-svn: 108260 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | (e.g., a call, cast, etc.), immediately adjust the expression's type
to strip cv-qualifiers off of all non-class types (in C++) or all
types (in C). This effectively extends my previous fix for PR7463,
which was restricted to calls, to other kinds of expressions within
similar characteristics. I've audited every use of
getNonReferenceType() in the code base, switching to the newly-renamed
getNonLValueExprType() where necessary. 
Big thanks to Eli for pointing out just how incomplete my original fix
for PR7463 actually was. We've been handling cv-qualifiers on rvalues
wrong for a very, very long time. Fixes PR7463.
llvm-svn: 108253 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types. 
Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().
Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).
llvm-svn: 108234 | 
| | 
| 
| 
| 
| 
| | on the fly when constructing it.
llvm-svn: 108166 | 
| | 
| 
| 
| 
| 
| | constructor.
llvm-svn: 108157 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | around by exempting enums from the check, but this doesn't handle a lot of
cases. A better approach is to directly check if the operator comes from
a macro expansion.
I've removed a reference to the rdar that originally led to the enum
suppression when removing it's overly contrived test case. Let me know if that
number or a more reasilistic test case involving enums is still needed.
llvm-svn: 108128 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | default arguments to template parameters don't have a DeclContext when
instantiated, and so we can't detect that we're in an instantiation context as
opposed to the definition context. However, it fixes the more commonly-occuring
cases in TMP code that use devolve to this type of tautology after
substitution.
llvm-svn: 108044 | 
| | 
| 
| 
| 
| 
| | be a dependent expression when its is built.
llvm-svn: 108026 | 
| | 
| 
| 
| | llvm-svn: 108000 | 
| | 
| 
| 
| 
| 
| 
| | a template, be sure to include the template arguments from the
injected-class-name. Fixes PR7587.
llvm-svn: 107895 | 
| | 
| 
| 
| 
| 
| 
| 
| | of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.
Makes de-serialization of the function body even more "lazier".
llvm-svn: 107768 | 
| | 
| 
| 
| 
| 
| 
| 
| | people seem to write when they want a deterministic trap.
Suggest instead that they use a volatile pointer or 
__builtin_trap.
llvm-svn: 107756 | 
| | 
| 
| 
| 
| 
| | AST during the instantiation. Fixes PR7417!
llvm-svn: 107690 | 
| | 
| 
| 
| | llvm-svn: 107626 | 
| | 
| 
| 
| | llvm-svn: 107624 | 
| | 
| 
| 
| | llvm-svn: 107347 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | As a bonus, fix the warning for || and && operators; it was emitted even if one of the operands had side effects, e.g:
x || test_logical_foo1();
emitted a bogus "expression result unused" for 'x'.
llvm-svn: 107274 | 
| | 
| 
| 
| 
| 
| 
| | looking for, reset the name within the LookupResult structure in
addition to clearing out the results. Fixes PR7508.
llvm-svn: 107197 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | __real myvec and __imag myvec, since they aren't all that useful (it's
just an identity function) but we might want to use them in more
restricted cases in the future (e.g., "__real mycomplexvec" could
extract the real parts of a vector of complex numbers).
llvm-svn: 106601 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | "floating type" in C, which does not include vector types. Introduce
Type::hasFloatingRepresentation() for the places where we want to know
whether the underlying representation is one or more floating-point
values. Remove some hacks we had where the former behavior of
Type::isFloatingType() was at odds with the language definition of the
term.
llvm-svn: 106584 | 
| | 
| 
| 
| | llvm-svn: 106497 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | attribute as part of the calculation. Sema::MarkDeclReferenced(), and
a few other places, want only to consider the "used" bit to determine,
e.g, whether to perform template instantiation. Fixes a linkage issue
with Boost.Serialization.
llvm-svn: 106252 | 
| | 
| 
| 
| 
| 
| | Patch by Nico Weber (pr7390).
llvm-svn: 106242 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | introduced by using decls are hidden even if their template parameter lists
or return types differ from the "overriding" declaration.
Propagate using shadow declarations around more effectively when looking up
template-ids.  Reperform lookup for template-ids in member expressions so that
access control is properly set up.
Fix some number of latent bugs involving template-ids with totally invalid
base types.  You can only actually get these with a scope specifier, since
otherwise the template-id won't parse as a template-id.
Fixes PR7384.
llvm-svn: 106093 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | provides C "integer type" semantics in C and C++ "integral type"
semantics in C++. 
Note that I still need to update isIntegerType (and possibly other
predicates) using the same approach I've taken for
isIntegralType(). The two should have the same meaning, but currently
don't (!).
llvm-svn: 106074 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | in C++ that involve both integral and enumeration types. Convert all
of the callers to Type::isIntegralType() that are meant to work with
both integral and enumeration types over to
Type::isIntegralOrEnumerationType(), to prepare to eliminate
enumeration types as integral types.
llvm-svn: 106071 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | C++ semantics, eliminating an extension diagnostic that doesn't match
C++ semantics (ordered comparison with NULL) and tightening some
extwarns to errors in C++ to match GCC and maintain conformance in
SFINAE contexts. Fixes <rdar://problem/7941392>.
llvm-svn: 106050 | 
| | 
| 
| 
| | llvm-svn: 106011 | 
| | 
| 
| 
| 
| 
| 
| | value semantics such that we recurse while the visitors return true, and halt
as soon as one returns false. Patch by csilvers.
llvm-svn: 105787 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | new design discussed on cfe-dev, with further steps in that direction to come.
It is already much more complete than the previous visitor.
Patch by Zhanyong and Craig with 80 column wraps and one missing declaration
added by me.
llvm-svn: 105709 | 
| | 
| 
| 
| 
| 
| | warnings, from Troy Straszheim! Fixes PR6163.
llvm-svn: 105631 | 
| | 
| 
| 
| 
| 
| | copy-in of c++ class objects into blocks.
llvm-svn: 105622 |