summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Provide a man page for scan-build. Patch by James Lowden!Ted Kremenek2012-05-101-0/+332
| | | | llvm-svn: 156559
* [preprocessor] Make sure that MacroExpands callbacks are always in source order.Argyrios Kyrtzidis2012-05-103-3/+41
| | | | | | Fixes assertion hit in the preprocessing record. rdar://11426523 llvm-svn: 156557
* Test for previously checked in patch.Fariborz Jahanian2012-05-101-0/+80
| | | | | | // rdar://11374235 llvm-svn: 156552
* Fix an assertion hit when the serialized diagnostics writer receive a diagnosticArgyrios Kyrtzidis2012-05-109-95/+144
| | | | | | | | | | | | | | from the frontend when the location is invalid and the SourceManager null. Instead of keeping the SourceManager object in DiagnosticRenderer, propagate it to the calls accordingly (as reference when it is expected to not be null, or pointer when it may be null). This effectively makes DiagnosticRenderer not tied to a specific SourceManager, removing a hack from TextDiagnosticPrinter. rdar://11386874 llvm-svn: 156536
* Warn about visibility attributes in typedefs.Rafael Espindola2012-05-102-0/+6
| | | | llvm-svn: 156534
* Fix an old (2009) FIXME:Rafael Espindola2012-05-107-125/+204
| | | | | | | | | | | | | | | | | | | | | // FIXME: This needs to happen before we merge declarations. Then, // let attribute merging cope with attribute conflicts. This was already being done for variables, but for functions we were merging then first and then applying the attributes. To avoid duplicating merging logic, some of the helpers in SemaDeclAttr.cpp become methods that can handle merging two attributes in one decl or inheriting attributes from one decl to another. With this change we are now able to produce errors for variables with incompatible visibility attributes or warn about unused dllimports in variables. This changes the attribute list iteration back to being in reverse source code order, as that matches what decl merging does and avoids differentiating the two cases is the merge*Attr methods. llvm-svn: 156531
* [analyzer] Do not highlight the range of the statement in case of leak.Anna Zaks2012-05-102-158/+24
| | | | | | | | | | We report a leak at a point a leaked variable is no longer accessible. The statement that happens to be at that point is not relevant to the leak diagnostic and, thus, should not be highlighted. radar://11178519 llvm-svn: 156530
* RecursiveASTVisitor:Richard Smith2012-05-092-2/+16
| | | | | | | | | | | | | We don't create any declaration to mark the explicit instantiation of function templates other than the instantiation itself, so visit that when traversing the function template decl. This is a temporary fix, pending the creation of a Decl node to represent the explicit instantiation. Patch by Daniel Jasper! llvm-svn: 156522
* objective-c. Fixes a 'fixit' where location ofFariborz Jahanian2012-05-095-3/+29
| | | | | | | '*' on objective-c class name was misplaced. // rdar://11311333 llvm-svn: 156517
* hopefully fix a bunch of ARM buildbot failuresNuno Lopes2012-05-0917-22/+22
| | | | llvm-svn: 156513
* Pull some cases of initialization with self-reference warnings out ofRichard Trieu2012-05-092-36/+67
| | | | | | -Wconditional-uninitialized into -Wuninitialized. llvm-svn: 156512
* Push the knowledge that we are parsing a type-id/type-name further into theRichard Smith2012-05-096-7/+21
| | | | | | | parser, and use it to emit better diagnostics in cases where an identifer can't be looked up as a type name. llvm-svn: 156508
* Stop AltiVec parsing from going down the 'implicit int' codepath as part of itsRichard Smith2012-05-093-2/+22
| | | | | | | normal parse for token sequences like 'vector pixel foo'. This incidentally also fixes a couple of wrong-parse issues. llvm-svn: 156503
* Roll logic into a single if statement, per David's suggestion.Chad Rosier2012-05-091-3/+2
| | | | llvm-svn: 156502
* Use the triple directly, rather then getTriple().Chad Rosier2012-05-091-1/+1
| | | | llvm-svn: 156501
* Pass a target triple explicitly to check platform specific macros definitions.Simon Atanasyan2012-05-092-0/+85
| | | | | | That allows to run the tests on all platforms successfully. llvm-svn: 156500
* Now the proper fix for r156497. Sorry for the churn.Chad Rosier2012-05-091-4/+5
| | | | llvm-svn: 156498
* Move the iOSVersionMin string to a header so as to avoid a dangling pointer.Chad Rosier2012-05-092-1/+4
| | | | llvm-svn: 156497
* Fix -Wdelete-non-virtual-dtor in Tooling code.David Blaikie2012-05-092-0/+6
| | | | | | Also, add an anchor as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 156495
* Update test case for new default of 3.0Chad Rosier2012-05-091-2/+2
| | | | llvm-svn: 156493
* Implement PPC64TargetCodeGenInfo.Roman Divacky2012-05-091-0/+60
| | | | llvm-svn: 156491
* ARM: Support marking intrinsic definitions as 'unavailable'Jim Grosbach2012-05-093-4/+11
| | | | llvm-svn: 156490
* [driver] Use the iOS target triple to infer the deployment target.Chad Rosier2012-05-092-2/+41
| | | | | | rdar://11409204 llvm-svn: 156489
* [analyzer]Extend the available checks list and the release notes for 264Anna Zaks2012-05-092-1/+51
| | | | llvm-svn: 156488
* Ignore a "generic" return value from getHostCPUName. <rdar://problem/11314502>Bob Wilson2012-05-091-1/+1
| | | | llvm-svn: 156487
* [libclang] Add a test for objc boxed expressions.Argyrios Kyrtzidis2012-05-092-0/+29
| | | | | | rdar://11407754 llvm-svn: 156485
* [analyzer] Simplify r156446, as per Ted's review.Anna Zaks2012-05-091-7/+2
| | | | llvm-svn: 156482
* [analyzer] Allow pointers to escape through selector callbacks.Anna Zaks2012-05-092-2/+32
| | | | llvm-svn: 156481
* Remove this test again which fails the build-bot for reasons yetFariborz Jahanian2012-05-091-85/+0
| | | | | | unknown to me. llvm-svn: 156480
* Declare abstract class ArgumentsAdjuster. This abstract interface describesSimon Atanasyan2012-05-096-3/+117
| | | | | | | | | | | | | a command line argument adjuster, which is responsible for command line arguments modification before the arguments are used to run a frontend action. Define class ClangSyntaxOnlyAdjuster implements ArgumentsAdjuster interface. This class converts input command line arguments to the "syntax check only" variant. Reviewed by Manuel Klimek. llvm-svn: 156478
* Re-add test for // rdar://11374235Fariborz Jahanian2012-05-091-0/+85
| | | | llvm-svn: 156477
* [AST/libclang] Speed up clang_getOverriddenCursors() considerably by ↵Argyrios Kyrtzidis2012-05-098-81/+252
| | | | | | | | | | | | | reserving a bit in ObjCMethodDecl to indicate whether the method does not override any other method, which is the majority of cases. That way we can avoid unnecessary work doing lookups, especially when PCH is involved. rdar://11360082 llvm-svn: 156476
* update calls to objectsize intrinsic to match LLVM r156473Nuno Lopes2012-05-094-6/+33
| | | | | | add a test for -fbounds-checking code generation llvm-svn: 156474
* Recover properly if a class member declaration starts with a scope specifierRichard Smith2012-05-094-10/+14
| | | | | | or template-id which can't be parsed. llvm-svn: 156468
* Fix Engrish.Ted Kremenek2012-05-091-1/+1
| | | | llvm-svn: 156465
* Teach IsTailPaddedMemberArray() (used by -Warray-bounds) that a FieldDecl ↵Ted Kremenek2012-05-092-4/+30
| | | | | | | | may have a Typedef type, and not always a ConstantArrayType. Fixes <rdar://problem/11387038>. llvm-svn: 156464
* A little tweak to the SFINAE condition reporting. Don't say:Richard Smith2012-05-094-3/+86
| | | | | | | | | | | | | | candidate template ignored: substitution failed [with T = int]: no type named 'type' in 'std::enable_if<false, void>' Instead, just say: candidate template ignored: disabled by 'enable_if' [with T = int] ... and point at the enable_if condition which (we assume) failed. This is applied to all cases where the user writes 'typename enable_if<...>::type' (optionally prefixed with a nested name specifier), and 'enable_if<...>' names a complete class type which does not have a member named 'type', and this results in a candidate function being ignored in a SFINAE context. Thus it catches 'std::enable_if', 'std::__1::enable_if', 'boost::enable_if' and 'llvm::enable_if'. llvm-svn: 156463
* Fix typo.Ted Kremenek2012-05-091-1/+1
| | | | llvm-svn: 156462
* Remove thid test for now.Fariborz Jahanian2012-05-091-85/+0
| | | | llvm-svn: 156455
* Update the SelfReferenceChecker. Refactored some of the visitor methods.Richard Trieu2012-05-092-32/+57
| | | | | | | Added support for conditional operators and tightened the exclusion of the unary operator from all operators to only the address of operator. llvm-svn: 156450
* Update checker build.Ted Kremenek2012-05-092-1/+10
| | | | llvm-svn: 156449
* Modern objective-c translation. Translating defaultFariborz Jahanian2012-05-082-20/+100
| | | | | | synthesis of property getter/setters. // rdar://11374235 llvm-svn: 156447
* [analyzer] We currently do not fully support CompoundLiterals inAnna Zaks2012-05-082-1/+33
| | | | | | | | | | | | RegionStore, so be explicit about it and generate UnknownVal(). This is a hack to ensure we never produce undefined values for a value coming from a compound value. (The undefined values can lead to false positives.) radar://10127782 llvm-svn: 156446
* add -fbounds-checking option.Nuno Lopes2012-05-088-2/+35
| | | | | | | | When enabled, clang generates bounds checks for array and pointers dereferences. Work to follow in LLVM's backend. OK'ed by Chad; thanks for the review. llvm-svn: 156431
* Having RegionStore lower field bindings to raw offsets, just like ↵Ted Kremenek2012-05-083-10/+23
| | | | | | | | | ElementRegions. This is a bit disruptive, but it allows RegionStore to better "see" through casts that reinterpret arrays of values as structs. Fixes <rdar://problem/11405978>. llvm-svn: 156428
* When creating lazy bindings in RegionStore, propagate existing lazy bindings ↵Ted Kremenek2012-05-081-1/+19
| | | | | | | | instead of creating new ones. This is a functionality optimization. llvm-svn: 156427
* Include address of Store in graphviz output of ExplodedGraph.Ted Kremenek2012-05-081-1/+3
| | | | llvm-svn: 156426
* Bind cleanups after doing l2r conversion on the operand of aJohn McCall2012-05-082-5/+11
| | | | | | | | @throw expression; l2r conversion can introduce new cleanups in certain cases, like when the expression is an ObjC property reference of retainable type in ARC. llvm-svn: 156425
* [analyzer] SelfInit: Stop tracking self if it's assigned a value weAnna Zaks2012-05-082-2/+52
| | | | | | | | | | | | | | don't reason about. Self is just like a local variable in init methods, so it can be assigned anything like result of static functions, other methods ... So to suppress false positives that result in such cases, stop tracking the checker-specific state after self is being assigned to (unless the value is't being assigned to is either self or conforms to our rules). This change does not invalidate any existing regression tests. llvm-svn: 156420
* modern objc translation. objc_getClass() and objc_getMetaClass()Fariborz Jahanian2012-05-082-17/+24
| | | | | | | prototypes should both return `struct objc_class *`. // rdar://11375495 llvm-svn: 156418
OpenPOWER on IntegriCloud