- Feb 14, 2009
-
-
Ted Kremenek authored
- Added a new 'node builder' class called GRStmtNodeBuilderRef (name may change). This is essentially a smart reference to a GRStmtNodeBuilder object that keeps track of the current context (predecessor node, GRExprEngine object, etc.) The idea is to gradually simplify the interface between GRExprEngine and GRTransferFuncs using this new builder (i.e., passing 1 argument instead of 5). It also handles some of the "auto-transition" for node creation, simplifying some of the logic in GRExprEngine itself. - Used GRStmtBuilderRef to replace GRTransferFuncs::EvalStore with GRTransferFuncs::EvalBind. The new EvalBind method will be used at any arbitrary places where a binding between a location and value takes place. Moreover, GRTransferFuncs no longer has the responsibility to request StoreManager to do the binding; this is now in GRExprEngine::EvalBind. All GRTransferFuncs::EvalBind does is checker-specific logic (which can be a no-op). llvm-svn: 64525
-
Anders Carlsson authored
llvm-svn: 64522
-
Anders Carlsson authored
llvm-svn: 64519
-
Douglas Gregor authored
Add test case to insure that implicit builtin declarations for C library functions aren't created in C++ llvm-svn: 64513
-
Douglas Gregor authored
printf-like functions, both builtin functions and those in the C library. The function-call checker now queries this attribute do determine if we have a printf-like function, rather than scanning through the list of "known functions IDs". However, there are 5 functions they are not yet "builtins", so the function-call checker handles them specifically still: - fprintf and vfprintf: the builtins mechanism cannot (yet) express FILE* arguments, so these can't be encoded. - NSLog: the builtins mechanism cannot (yet) express NSString* arguments, so this (and NSLogv) can't be encoded. - asprintf and vasprintf: these aren't part of the C99 standard library, so we really shouldn't be defining them as builtins in the general case (and we don't seem to have the machinery to make them builtins only on certain targets and depending on whether extensions are enabled). llvm-svn: 64512
-
Ted Kremenek authored
llvm-svn: 64507
-
-
Douglas Gregor authored
etc.) when we perform name lookup on them. This ensures that we produce the correct signature for these functions, which has two practical impacts: 1) When we're supporting the "implicit function declaration" feature of C99, these functions will be implicitly declared with the right signature rather than as a function returning "int" with no prototype. See PR3541 for the reason why this is important (hint: GCC always predeclares these functions). 2) If users attempt to redeclare one of these library functions with an incompatible signature, we produce a hard error. This patch does a little bit of work to give reasonable error messages. For example, when we hit case #1 we complain that we're implicitly declaring this function with a specific signature, and then we give a note that asks the user to include the appropriate header (e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In case #2, we show the type of the implicit builtin that was incorrectly declared, so the user can see the problem. We could do better here: for example, when displaying this latter error message we say something like: 'strcpy' was implicitly declared here with type 'char *(char *, char const *)' but we should really print out a fake code line showing the declaration, like this: 'strcpy' was implicitly declared here as: char *strcpy(char *, char const *) This would also be good for printing built-in candidates with C++ operator overloading. The set of C library functions supported by this patch includes all functions from the C99 specification's <stdlib.h> and <string.h> that (a) are predefined by GCC and (b) have signatures that could cause codegen issues if they are treated as functions with no prototype returning and int. Future work could extend this set of functions to other C library functions that we know about. llvm-svn: 64504
-
Chris Lattner authored
llvm-svn: 64503
-
- Feb 13, 2009
-
-
Daniel Dunbar authored
llvm-svn: 64502
-
Daniel Dunbar authored
llvm-svn: 64501
-
Daniel Dunbar authored
llvm-svn: 64500
-
Daniel Dunbar authored
__attribute__((used))". llvm-svn: 64499
-
Daniel Dunbar authored
llvm-svn: 64498
-
Chris Lattner authored
definition of __intptr_t_defined when stdint.h defines intptr_t. llvm-svn: 64497
-
Chris Lattner authored
a target. Make Preprocessor.cpp define a new __INTPTR_TYPE__ macro based on this. On linux/32, set intptr_t to int, instead of long. This fixes PR3563. llvm-svn: 64495
-
Ted Kremenek authored
Add test case illustrating special handling of 'SenTestCase' subclasses for the missing -dealloc check. llvm-svn: 64494
-
Chris Lattner authored
the vla-in-structure extension that GCC does. PR3562 Also wrap some long lines. llvm-svn: 64493
-
Daniel Dunbar authored
- PR3566 llvm-svn: 64492
-
Chris Lattner authored
just silently return an error to avoid bogus diagnostics. llvm-svn: 64491
-
Ted Kremenek authored
PTH: Cache directory and negative 'stat' calls. This gives us a 1% performance improvement on Cocoa.h (fsyntax-only+PTH). llvm-svn: 64490
-
Chris Lattner authored
llvm-svn: 64489
-
Daniel Dunbar authored
- Fix emission of static functions with constructor attribute while I was here. <rdar://problem/6140899> [codegen] "static" and attribute-constructor interact poorly llvm-svn: 64488
-
Daniel Dunbar authored
for attribute used support. - No functionality change. llvm-svn: 64487
-
Mike Stump authored
llvm-svn: 64486
-
Chris Lattner authored
llvm-svn: 64485
-
Mike Stump authored
llvm-svn: 64482
-
Mike Stump authored
llvm-svn: 64481
-
rdar://6562329Chris Lattner authored
wine sources. This was happening because HighlightMacros was calling EnterMainFile multiple times on the same preprocessor object and getting an assert due to the new #line stuff (the file in question was bison output with #line directives). The fix for this is to not reenter the file. Instead, relex the tokens in raw mode, swizzle them a bit and repreprocess the token stream. An added bonus of this is that rewrite macros will now hilight the macro definition as well as its uses. Woo. llvm-svn: 64480
-
Mike Stump authored
llvm-svn: 64479
-
Daniel Dunbar authored
llvm-svn: 64478
-
Ted Kremenek authored
Add some boilerplate to the PTH file to prepare for the caching of stats for directories (and negative stats too). llvm-svn: 64477
-
Douglas Gregor authored
llvm-svn: 64476
-
Mike Stump authored
llvm-svn: 64475
-
Douglas Gregor authored
by DeclContexts (always) rather than by statements. DeclContext currently goes out of its way to avoid destroying any Decls that might be owned by a DeclGroupOwningRef. However, in an error-recovery situation, a failure in a declaration statement can cause all of the decls in a DeclGroupOwningRef to be destroyed after they've already be added into the DeclContext. Hence, DeclContext is left with already-destroyed declarations, and bad things happen. This problem was causing failures that showed up as assertions on x86 Linux in test/Parser/objc-forcollection-neg-2.m. llvm-svn: 64474
-
Mike Stump authored
llvm-svn: 64473
-
Douglas Gregor authored
llvm-svn: 64472
-
Anders Carlsson authored
llvm-svn: 64471
-
Fariborz Jahanian authored
implementation with no category declaration! llvm-svn: 64470
-
Daniel Dunbar authored
- Now at 1274 passes on gcc compat suite vs 1262. llvm-svn: 64469
-