- Dec 13, 2011
-
-
Nick Lewycky authored
llvm-svn: 146476
-
Nick Lewycky authored
llvm-svn: 146454
-
Francois Pichet authored
Necessary to parse Microsoft ATL code. Example: int array[] = { 0, __if_exists(CLASS::Type) {2, } 3 }; will declare an array of 2 or 3 elements depending on if CLASS::Type exists or not. llvm-svn: 146447
-
Fariborz Jahanian authored
inside a struct/union. llvm-svn: 146444
-
Eli Friedman authored
Make CGRecordLayoutBuilder correctly switch over to a packed class when a class has a base whose alignment will break the class layout. <rdar://problem/10551376>. llvm-svn: 146443
-
- Dec 12, 2011
-
-
Matt Beaumont-Gay authored
The motivation here is a "clever" implementation of strncmp(), which peels the first few comparisons via chained conditional expressions which ensure that the input arrays are known at compile time to be sufficiently large. llvm-svn: 146430
-
Fariborz Jahanian authored
fields by just following what comment says. // rdar://10513599 llvm-svn: 146414
-
Richard Smith authored
conversions in constant expressions. llvm-svn: 146406
-
Douglas Gregor authored
the subdirectories to find headers in submodules. llvm-svn: 146398
-
Richard Smith authored
llvm-svn: 146395
-
Douglas Gregor authored
actually a terribly good heuristic, and the world is too horrible for it to work. llvm-svn: 146393
-
Hans Wennborg authored
llvm-svn: 146392
-
Hans Wennborg authored
llvm-svn: 146390
-
Richard Smith authored
llvm-svn: 146371
-
Hans Wennborg authored
llvm-svn: 146367
-
David Blaikie authored
llvm-svn: 146354
-
- Dec 11, 2011
-
-
Anna Zaks authored
[analyzer] CStringChecker should not rely on the analyzer generating UndefOrUnknown value when it cannot reason about the expression. We are now often generating expressions even if the solver is not known to be able to simplify it. This is another cleanup of the existing code, where the rest of the analyzer and checkers should not base their logic on knowing ahead of the time what the solver can reason about. In this case, CStringChecker is performing a check for overflow of 'left+right' operation. The overflow can be checked with either 'maxVal-left' or 'maxVal-right'. Previously, the decision was based on whether the expresion evaluated to undef or not. With this patch, we check if one of the arguments is a constant, in which case we know that 'maxVal-const' is easily simplified. (Another option is to use canReasonAbout() method of the solver here, however, it's currently is protected.) This patch also contains 2 small bug fixes: - swap the order of operators inside SValBuilder::makeGenericVal. - handle a case when AddeVal is unknown in GenericTaintChecker::getPointedToSymbol. llvm-svn: 146343
-
- Dec 10, 2011
-
-
Hans Wennborg authored
and offer fixits when there is a mismatch. llvm-svn: 146326
-
NAKAMURA Takumi authored
llvm-svn: 146321
-
Douglas Gregor authored
under ARC. Fixes <rdar://problem/10530209>. llvm-svn: 146307
-
Fariborz Jahanian authored
// rdar://10095131 llvm-svn: 146304
-
Douglas Gregor authored
llvm-svn: 146303
-
Douglas Gregor authored
template instantiation), and that expression might produce a temporary, invoke MaybeBindToTemporary. Otherwise, we forget to destroy objects, release objects, etc. Fixes <rdar://problem/10531073>. llvm-svn: 146301
-
Eli Friedman authored
llvm-svn: 146291
-
Richard Smith authored
C++11 ICE rules. llvm-svn: 146290
-
- Dec 09, 2011
-
-
Richard Smith authored
whether an expression is a (core) constant expression as a side-effect of evaluation. This takes us from accepting far too few expressions as ICEs to accepting slightly too many -- fixes for the remaining cases are coming next. The diagnostics produced when an expression is found to be non-constant are currently quite poor (with generic wording but reasonable source locations), and will be improved in subsequent commits. llvm-svn: 146289
-
David Blaikie authored
Add notes for suppressing and (if it's a zero-arg function returning bool) fixing the function-to-bool conversion warning. llvm-svn: 146280
-
Fariborz Jahanian authored
// rdar://10535245 llvm-svn: 146272
-
David Blaikie authored
Provide a separate warning for weak vtables in explicit template instantiations. There's no (current) way to fix such templates to emit strong symbols/vtables, but perhaps users want to know about the cost being incurred anyway. llvm-svn: 146265
-
Hans Wennborg authored
in addition to underlying type. llvm-svn: 146254
-
Hans Wennborg authored
It should reset the length modifier (unless it's a wchar_t string). llvm-svn: 146252
-
Anna Zaks authored
types are equivalent. + A taint test which tests bitwise operations and which was triggering an assertion due to presence of the integer to integer cast. llvm-svn: 146240
-
Richard Smith authored
documentation) with one based on what GCC's __builtin_constant_p is actually intended to do (discovered by asking a friendly GCC developer). In particular, an expression which folds to a pointer is now only considered to be a "constant" by this builtin if it refers to the first character in a string literal. This fixes a rather subtle wrong-code issue when building with glibc. Given: const char cs[4] = "abcd"; int f(const char *p) { return strncmp(p, cs, 4); } ... the macro magic for strncmp produces a (potentially crashing) call to strlen(cs), because it expands to an expression starting with: __builtin_constant_p(cs) && strlen(cs) < 4 ? /* ... */ Under the secret true meaning of __builtin_constant_p, this is guaranteed to be safe! llvm-svn: 146236
-
Douglas Gregor authored
all of the headers below that particular directory. Use umbrella directories as a clean way to deal with (1) directories/frameworks that don't have an umbrella header, but don't want to enumerate all of their headers, and (2) PrivateHeaders, which we never want to enumerate and want to keep separate from the main umbrella header. This also eliminates a little more of the "magic" for private headers, and frameworks in general. llvm-svn: 146235
-
Fariborz Jahanian authored
// rdar://10535640 llvm-svn: 146218
-
Argyrios Kyrtzidis authored
llvm-svn: 146210
-
- Dec 08, 2011
-
-
Anna Zaks authored
+ random comments llvm-svn: 146199
-
Eli Friedman authored
llvm-svn: 146189
-
Hal Finkel authored
llvm-svn: 146176
-
DeLesley Hutchins authored
llvm-svn: 146174
-