summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Pass the location of the start of the selector to ↵Anders Carlsson2009-02-144-13/+19
| | | | | | ActOnClassMessage/ActOnInstanceMessage. llvm-svn: 64560
* Fix 80col violations.Mike Stump2009-02-141-71/+144
| | | | llvm-svn: 64559
* Patch by Ben Laurie:Ted Kremenek2009-02-146-239/+1131
| | | | | | | | | | | | | | | | | | | | ConstraintManager: - constify getSymVal() BasicConstraintManager: - Pull out logic that would be common to ConstraintManagers of a similar nature and put them in a parent class called 'SimpleConstraintManager'. RangeConstraintManager: - Added a new prototype ConstraintManager to track ranges of variables! This ConstraintManager keeps tracks of ranges of concrete integers that a symbolic integer may have. AnalysisConsumer: - Add driver option to use RangeConstraintManager with GRExprEngine-based analyses. llvm-svn: 64558
* Define __ELF__ on FreeBSD. Patch by Roman Divacky!Anton Korobeynikov2009-02-141-1/+1
| | | | llvm-svn: 64557
* Fix the build on win32.Cedric Venet2009-02-148-9/+21
| | | | llvm-svn: 64556
* Define __ELF__ for linux systems.Argyrios Kyrtzidis2009-02-141-0/+1
| | | | llvm-svn: 64553
* new tests, it would be nice to not warn on the second one.Chris Lattner2009-02-141-0/+9
| | | | llvm-svn: 64549
* simplify some code.Chris Lattner2009-02-141-8/+7
| | | | llvm-svn: 64548
* just ignore hte format_arg attribute for now, it doesn't have any semantic ↵Chris Lattner2009-02-141-2/+4
| | | | | | implications. llvm-svn: 64547
* add parser and type checking support for attribute((objc_exception)).Chris Lattner2009-02-146-17/+65
| | | | | | | We don't have "zero cost" exceptions for ObjC yet, so there is no codegen support required. llvm-svn: 64546
* rename testChris Lattner2009-02-141-0/+0
| | | | llvm-svn: 64545
* Several related changes: Chris Lattner2009-02-1410-97/+214
| | | | | | | | | | | | | | | 1) implement parser and sema support for reading and verifying attribute(warnunusedresult). 2) rename hasLocalSideEffect to isUnusedResultAWarning, inverting the sense of its result. 3) extend isUnusedResultAWarning to directly return the loc and range info that should be reported to the user. Make it substantially more precise in some cases than what was previously reported. 4) teach isUnusedResultAWarning about CallExpr to decls that are pure/const/warnunusedresult, fixing a fixme. 5) change warn_attribute_wrong_decl_type to not pass in english strings, instead, pass in integers and use %select. llvm-svn: 64543
* reduce nesting.Chris Lattner2009-02-141-14/+11
| | | | llvm-svn: 64542
* GRExprEngine: Handle empty statement expressions.Ted Kremenek2009-02-142-8/+18
| | | | llvm-svn: 64541
* Don't ignore the const attribute - we even have CG support for that. Do ↵Anders Carlsson2009-02-142-3/+2
| | | | | | ignore the malloc attribute however. llvm-svn: 64538
* Fix more xmmintrin.h typosAnders Carlsson2009-02-141-4/+4
| | | | llvm-svn: 64537
* ignore the const attribute for now.Chris Lattner2009-02-141-0/+1
| | | | llvm-svn: 64536
* Added GRStateManager::scanReachableSymbols(), a method which scans the reachableTed Kremenek2009-02-148-23/+115
| | | | | | | | | | | | | symbols from an SVal. - Fixed a bug in EnvironmentManager::RemoveDeadBindings() where it did not mark live all the symbols reachable from a live block-level expression. - Fixed a bug in the retain/release checker where it did not stop tracking symbols that 'escaped' via compound literals being assigned to something the BasicStoreManager didn't reason about. llvm-svn: 64534
* x86_64 ABI: Need to use canonical types when comparing againstDaniel Dunbar2009-02-141-2/+6
| | | | | | ASTContext types. llvm-svn: 64533
* x86_64 ABI: Pass simple types directly when possible. This isDaniel Dunbar2009-02-142-2/+61
| | | | | | | important for both keeping the generated LLVM simple and for ensuring that integer types are passed/promoted correctly. llvm-svn: 64529
* Use GRTransferFuncs::EvalBind when processing variable initializations.Ted Kremenek2009-02-141-26/+34
| | | | llvm-svn: 64527
* Make it possible for builtins to expression FILE* arguments, so thatDouglas Gregor2009-02-1410-23/+63
| | | | | | | | we can define builtins such as fprintf, vfprintf, and __builtin___fprintf_chk. Give a nice error message when we need to implicitly declare a function like fprintf. llvm-svn: 64526
* Static analyzer:Ted Kremenek2009-02-146-105/+147
| | | | | | | | | | | | | | | | | | | | - 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
* Fix an error in _mm_loaddup_pd that Eli noticed.Anders Carlsson2009-02-141-1/+1
| | | | llvm-svn: 64522
* Add the nodebug attribute to intrinsicsAnders Carlsson2009-02-145-407/+407
| | | | llvm-svn: 64519
* Add test case to insure that implicit builtin declarations for C library ↵Douglas Gregor2009-02-141-0/+7
| | | | | | functions aren't created in C++ llvm-svn: 64513
* Extend builtin "attribute" syntax to include a notation forDouglas Gregor2009-02-1411-95/+115
| | | | | | | | | | | | | | | | | | | | | 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
* Update checker build.Ted Kremenek2009-02-131-1/+1
| | | | llvm-svn: 64507
* fix rdar://6586493, a bug in codegen of the GNU Chris Lattner2009-02-132-9/+25
| | | | | | missing-?:-true-value extension. llvm-svn: 64505
* Implicitly declare certain C library functions (malloc, strcpy, memmove,Douglas Gregor2009-02-1319-52/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* add an assertion from Alexei Svitkine!Chris Lattner2009-02-131-2/+2
| | | | llvm-svn: 64503
* Set constant bit on static block vars as well. Patch by Anders Johnson!qDaniel Dunbar2009-02-132-2/+11
| | | | llvm-svn: 64502
* Fix typo in printing of __private_extern__.Daniel Dunbar2009-02-131-1/+1
| | | | llvm-svn: 64501
* Simplify predicate.Daniel Dunbar2009-02-131-3/+1
| | | | llvm-svn: 64500
* Warn about attribute used ignored on "extern int aDaniel Dunbar2009-02-132-1/+4
| | | | | | __attribute__((used))". llvm-svn: 64499
* Add VarDecl::hasExternalStorage (no functionality change).Daniel Dunbar2009-02-131-0/+6
| | | | llvm-svn: 64498
* anders johnson points out that some software depends on theChris Lattner2009-02-131-0/+3
| | | | | | definition of __intptr_t_defined when stdint.h defines intptr_t. llvm-svn: 64497
* Give TargetInfo a new IntPtrType to hold the intptr_t type forChris Lattner2009-02-135-20/+8
| | | | | | | | | | 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
* Add test case illustrating special handling of 'SenTestCase' subclasses for ↵Ted Kremenek2009-02-131-1/+33
| | | | | | the missing -dealloc check. llvm-svn: 64494
* improve wording in a diagnostic to make it clear that we never intend to supportChris Lattner2009-02-131-5/+11
| | | | | | | the vla-in-structure extension that GCC does. PR3562 Also wrap some long lines. llvm-svn: 64493
* IRgen support for attribute used.Daniel Dunbar2009-02-134-8/+43
| | | | | | - PR3566 llvm-svn: 64492
* If x is an invalid field decl, don't construct an expression for P->x, Chris Lattner2009-02-132-0/+19
| | | | | | just silently return an error to avoid bogus diagnostics. llvm-svn: 64491
* PTH: Cache directory and negative 'stat' calls. This gives us a 1% ↵Ted Kremenek2009-02-132-38/+83
| | | | | | performance improvement on Cocoa.h (fsyntax-only+PTH). llvm-svn: 64490
* wrap some crazy long lines.Chris Lattner2009-02-131-2/+8
| | | | llvm-svn: 64489
* Pull MayDeferGeneration out of EmitGlobal.Daniel Dunbar2009-02-133-17/+58
| | | | | | | | - 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
* Rename EmitStatics (etc) to EmitDeferred; provide basic infrastructureDaniel Dunbar2009-02-132-20/+61
| | | | | | | for attribute used support. - No functionality change. llvm-svn: 64487
* Let the backend unique these.Mike Stump2009-02-133-6/+2
| | | | llvm-svn: 64486
* document __builtin_shufflevectorChris Lattner2009-02-131-50/+29
| | | | llvm-svn: 64485
* Fix spelling.Mike Stump2009-02-131-2/+2
| | | | llvm-svn: 64482
* Move DescriptorUniqueCount into CGM.Mike Stump2009-02-133-4/+5
| | | | llvm-svn: 64481
OpenPOWER on IntegriCloud