- Feb 18, 2009
-
-
Daniel Dunbar authored
llvm-svn: 64944
-
Chris Lattner authored
we used to not account for escapes in strings with string concat. Before: t.m:5:20: warning: field width should have type 'int', but argument has type 'unsigned int' printf("\n\n" "\n\n%*d", (unsigned) 1, 1); ^ ~~~~~~~~~~~~ after: t.m:5:23: warning: field width should have type 'int', but argument has type 'unsigned int' printf("\n\n" "\n\n%*d", (unsigned) 1, 1); ^ ~~~~~~~~~~~~ llvm-svn: 64941
-
Chris Lattner authored
escapes in the string for subtoken positioning. This gives us working examples like: t.m:5:16: warning: field width should have type 'int', but argument has type 'unsigned int' printf("\n\n%*d", (unsigned) 1, 1); ^ ~~~~~~~~~~~~ where before the caret pointed two spaces to the left. llvm-svn: 64940
-
Chris Lattner authored
llvm-svn: 64939
-
Ted Kremenek authored
retain/releases performed via [... release] and CFRetain(). The former are no-ops in GC. The checker already handled this, but now we emit nice diagnostics to the user telling them that these are no-ops. llvm-svn: 64937
-
Chris Lattner authored
We now emit: t.m:6:15: warning: field width should have type 'int', but argument has type 'unsigned int' printf(STR, (unsigned) 1, 1); ^ ~~~~~~~~~~~~ t.m:3:18: note: instantiated from: #define STR "abc%*ddef" ^ which has the correct location in the string literal in the note line. llvm-svn: 64936
-
Fariborz Jahanian authored
objc gc type attributes. llvm-svn: 64935
-
Chris Lattner authored
llvm-svn: 64934
-
Chris Lattner authored
it needs cleaning. llvm-svn: 64932
-
Chris Lattner authored
and escaped newlines don't throw off the offset computation. On this testcase: printf("abc\ def" "%*d", (unsigned) 1, 1); Before: t.m:5:5: warning: field width should have type 'int', but argument has type 'unsigned int' def" ^ after: t.m:6:12: warning: field width should have type 'int', but argument has type 'unsigned int' "%*d", (unsigned) 1, 1); ^ ~~~~~~~~~~~~ llvm-svn: 64930
-
Fariborz Jahanian authored
llvm-svn: 64927
-
Fariborz Jahanian authored
This make warn-weak-field.m to fail (subject of a followup patch). attr-objc-gc.m no passes. llvm-svn: 64925
-
Chris Lattner authored
First step, handle diagnostics in StringLiteral's that are due to token pasting. For example, we now handle: id str2 = @"foo" "bar" @"baz" " b\0larg"; // expected-warning {{literal contains NUL character}} Correctly: test/SemaObjC/exprs.m:17:15: warning: CFString literal contains NUL character " b\0larg"; // expected-warning {{literal contains NUL character}} ~~~^~~~~~~ There are several other related issues still to be done. llvm-svn: 64924
-
Douglas Gregor authored
us whether there was an error in trying to parse a type-name (type-id in C++). This allows propagation of errors further in the compiler, suppressing more bogus error messages. llvm-svn: 64922
-
Ted Kremenek authored
Revise comment. Comparing pointer values in 'Range' wasn't the performance issue I thought it was, but it is still worth ordering Range objects by their APSInt values. llvm-svn: 64921
-
Douglas Gregor authored
Add an unavailable __tg_promote function to attract incorrect uses of type-generic macros, rom Howard Hinnant. llvm-svn: 64919
-
Chris Lattner authored
llvm-svn: 64903
-
Douglas Gregor authored
any named parameters, e.g., this is accepted in C: void f(...) __attribute__((overloadable)); although this would be rejected: void f(...); To do this, moved the checking of the "ellipsis without any named arguments" condition from the parser into Sema (where it belongs anyway). llvm-svn: 64902
-
Chris Lattner authored
so it shows up in -ast-dump. llvm-svn: 64901
-
Chris Lattner authored
Sema::ParseObjCStringLiteral. llvm-svn: 64900
-
Chris Lattner authored
stuff behind a private static function. llvm-svn: 64898
-
Douglas Gregor authored
to do in this area, since there are other places that reference FunctionDecls. Don't allow "overloadable" functions (in C) to be declared without a prototype. llvm-svn: 64897
-
Chris Lattner authored
llvm-svn: 64896
-
Chris Lattner authored
it faster in the common case when NSConstantString is around. llvm-svn: 64895
-
Chris Lattner authored
llvm-svn: 64894
-
Chris Lattner authored
llvm-svn: 64893
-
Chris Lattner authored
the various PPTokens that are pasted together to make it. In the course of working on this, I discovered ParseObjCStringLiteral which needs some work. I'll tackle it next. llvm-svn: 64892
-
Ted Kremenek authored
When comparing if one Range is "less" than another, compare the actual APSInt numeric values instead of their pointer addresses. This ensures that the ImmutableSet in RangeSet always has a consistent ordering between Ranges. This is critical for generating the same digest/hash for the contents of the sets. This was a serious performance bug because it would often cause state caching to be disabled along complicated paths. Along the way: - Put Range and RangeSet in the "anonymous namespace" and mark them hidden llvm-svn: 64890
-
Fariborz Jahanian authored
Note that one test attr-objc-gc.m fails. I will fix this after removing these attributes from the Decl nodes. llvm-svn: 64889
-
rdar://6597252Chris Lattner authored
compatible, even if they are weird implicit objc pointer types like Class. llvm-svn: 64885
-
Chris Lattner authored
llvm-svn: 64884
-
Ted Kremenek authored
back to the summary used when evaluating the statement associated with a simulation node. This is now being used to help improve the checker's diagnostics. To get things started, the checker now emits a path diagnostic indicating that 'autorelease' is a no-op in GC mode. Some of these changes are exposing further grossness in the interface between BugReporter and the ExplodedGraph::Trim facilities. These really need to be cleaned up one day. llvm-svn: 64881
-
Daniel Dunbar authored
1. Return of _Complex long double used wrong type. 2. va_arg of types passed in two SSE registers didn't account for extra space in register save area. Down to 18 failures on gcc/compat/x86_64. Combined 32/64 results are: -- === gcc Summary === # of expected passes 1292 # of unexpected failures 34 # of unsupported tests 2 -- llvm-svn: 64880
-
Ted Kremenek authored
llvm-svn: 64876
-
Daniel Dunbar authored
Add assert to isICE that, on success, result must be the same as EvaluateAsInt()... this enforces a minimum level of sanity. llvm-svn: 64865
-
Daniel Dunbar authored
- This idiom ensures that the result will have the right width and type. - Tested on most of x86_64/llvm-test to satisfy my paranoia. - This fixes at least the following bugs: o UnaryTypeTraitExpr wasn't setting the width correctly. o Arithmetic on _Bool wasn't setting the width correctly. And probably a number more. llvm-svn: 64864
-
Chris Lattner authored
keep searching for C++ headers when in C++ mode). In theory clang should be able to find all of its own headers now. If not, the CPATH or C_INCLUDE_PATH environment variables can be specified to add a include path. llvm-svn: 64862
-
Ted Kremenek authored
llvm-svn: 64852
-
Mike Stump authored
Build of the parm list with the iterator, not end(). llvm-svn: 64851
-
Daniel Dunbar authored
with Expr::Evaluate(). llvm-svn: 64850
-