Old warning:
warning: use of NULL in arithmetic operation [-Wnull-arithmetic]
return 10 <= NULL;
^ ~~~~
New warning:
warning: comparison between NULL and non-pointer ('int' and NULL) [-Wnull-arithmetic]
return 10 <= NULL;
~~ ^ ~~~~
llvm-svn: 137377
either "special" type has already been initialized. Previously, we did
this check based on just the first special type (__builtin_va_list),
but now we have some NULL special type entries to content with.
llvm-svn: 137373
ASTContext with accessors/mutators. The only functional change is that
the AST writer won't bother writing the id/Class/SEL redefinition type
if it hasn't been explicitly set; previously, it ended up being
written as a synonym for the built-in id/Class/SEL.
llvm-svn: 137349
hierarchy of delegation, and that EH selector values are meaningful
function-wide (good thing, too, or inlining wouldn't work).
2,3d
1a
hierarchy of delegation and that EH selector values have the same
meaning everywhere in the function instead of being meaningful only
in the context of a specific selector.
This removes the need for routing edges through EH cleanups,
since a cleanup simply always branches to its enclosing scope.
llvm-svn: 137293
a member template, e.g.,
x.f<int>
if we have found a template in the type of x, but the lookup in the
current scope is ambiguous, just ignore the lookup in the current
scope. Fixes <rdar://problem/9915664>.
llvm-svn: 137255
overridden methods to diagnose their type mismatch.
This is a general solution for previous fixes
for // rdar://6191214 and // rdar://9352731
and removes lots of duplicate code.
llvm-svn: 137222
constructor. Previously, we did some bogus recursion into the fields
of anonymous structs (recursively), which ended up building invalid
ASTs that would cause CodeGen to crash due to invalid GEPs.
Now, we instead build the default initializations based on the
indirect field declarations at the top level, which properly generates
the sequence of GEPs needed to initialize the proper member. Fixes
PR10512 and <rdar://problem/9924046>.
llvm-svn: 137212
This patch special cases the parser for thread safety attributes so that all
attribute arguments are put in the argument list (instead of a special
parameter) since arguments may not otherwise resolve correctly without two-token
lookahead.
This patch also adds checks to make sure that attribute arguments are
lockable objects.
llvm-svn: 137130
enumerations from the ASTContext into CodeGen, so that we don't need
to serialize it to AST files. This appears to be the last of the
low-hanging fruit for SpecialTypes.
llvm-svn: 137124
layout of a constant NSString from the ASTContext over to CodeGen,
since this is solely CodeGen's responsibility. Eliminates one of the
unnecessary "special" types that we serialize.
llvm-svn: 137121
Some interesting stats from 'diagtool list-warnings' on the current version of clang:
Percentage of warnings with flags: 48.79%
Number of unique flags: 148
Average number of diagnostics per flag: 2.041
llvm-svn: 137109