summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Escape \n and \r in doxycomment.David Blaikie2012-06-061-2/+2
| | | | llvm-svn: 158091
* Remove unused private member variables found by clang's new ↵Benjamin Kramer2012-06-0615-90/+49
| | | | | | -Wunused-private-field. llvm-svn: 158086
* Add pedantic warning -Wempty-translation-unit (C11 6.9p1).Jordan Rose2012-06-064-20/+41
| | | | | | | | | | | | | | | | | | | In standard C since C89, a 'translation-unit' is syntactically defined to have at least one "external-declaration", which is either a decl or a function definition. In Clang the latter gives us a declaration as well. The tricky bit about this warning is that our predefines can contain external declarations (__builtin_va_list and the 128-bit integer types). Therefore our AST parser now makes sure we have at least one declaration that doesn't come from the predefines buffer. Also, remove bogus warning about empty source files. This doesn't catch source files that only contain comments, and never fired anyway because of our predefines. PR12665 and <rdar://problem/9165548> llvm-svn: 158085
* Zap the /Za compiler switch from MSVC projects, the option is considered ↵Francois Pichet2012-06-063-16/+2
| | | | | | | | harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed. Only 1 minor code change was necessary: can't use cdecl as variable name anymore. llvm-svn: 158063
* Introduce -Wunused-private-field. If enabled, this warning detectsDaniel Jasper2012-06-063-2/+147
| | | | | | | unused private fields of classes that are fully defined in the current translation unit. llvm-svn: 158054
* Disable path pruning for UndefResultChecker. It turns out we usually want ↵Ted Kremenek2012-06-061-0/+2
| | | | | | | | to see more of the path to discover how a value was used uninitialized. llvm-svn: 158048
* A non-explicit constructor template with a second parameter that is aDouglas Gregor2012-06-051-1/+3
| | | | | | parameter pack is a converting constructor. Fixes PR13003. llvm-svn: 158040
* PlistDiagnostics: force the ranges for control-flow edges to be single ↵Ted Kremenek2012-06-051-2/+10
| | | | | | | | locations, forcing adjacent edges to have compatible ranges. This simplifies the layout logic for some clients. llvm-svn: 158028
* objective-c: merge deprecated/unavailable attributes toFariborz Jahanian2012-06-051-5/+2
| | | | | | | the overriding deprecated/unavailable method. // rdar://11475360 llvm-svn: 158022
* Fix a bug with va_arg and vectors on Darwin x86-32. <rdar://problem/11592208>.Eli Friedman2012-06-051-2/+7
| | | | llvm-svn: 158017
* Reapply "Only emit debug information for methods that are user defined, there's"Eric Christopher2012-06-051-2/+6
| | | | | | | | As the failing testcase has been fixed. This reverts commit 0637f407e6ee7fdccde17fbf9a5fcc4853187b3e. llvm-svn: 158009
* Mips: Define __mips_hard_float macro additional to __mips_single_floatSimon Atanasyan2012-06-051-6/+7
| | | | | | when single float ABI is selected. llvm-svn: 157996
* Revert "Only emit debug information for methods that are user defined, there's"John McCall2012-06-051-6/+2
| | | | | | | This reverts r157970, which was not passing on clang-x86_64-darwin10-nobootstrap-RA llvm-svn: 157983
* Only emit debug information for methods that are user defined, there'sEric Christopher2012-06-051-2/+6
| | | | | | | | | not much reason to emit for constructors and destructors that aren't user defined. rdar://11593099 llvm-svn: 157970
* Teach format string checking about compile-time CFString constants.Jordan Rose2012-06-041-20/+24
| | | | | | | | | | | | | Within the guts of CheckFormatHandler, the IsObjCLiteral flag was being used in two ways: to see if null bytes were allowed, and to see if the '%@' specifier is allowed.* The former usage has been changed to an explicit test and the latter pushed down to CheckPrintfHandler and renamed ObjCContext, since it applies to CFStrings as well. * This also changes how wide chars are interpreted; in OS X Foundation, the wide character type is 'unichar', a typedef for short, rather than wchar_t. llvm-svn: 157968
* Make suggestions for mismatched enum arguments to printf/scanf.Jordan Rose2012-06-042-0/+9
| | | | llvm-svn: 157962
* Teach printf/scanf about enums with fixed underlying types.Jordan Rose2012-06-042-10/+25
| | | | llvm-svn: 157961
* PR13022: cope with parenthesized function types in MS name mangling.Richard Smith2012-06-041-1/+1
| | | | llvm-svn: 157959
* Add a warning for when an array-to-pointer decay is performed on an arrayRichard Smith2012-06-043-4/+69
| | | | | | | | | | | | | | | temporary or an array subobject of a class temporary, and the resulting value is used to initialize a pointer which outlives the temporary. Such a pointer is always left dangling after the initialization completes and the array's lifetime ends. In order to detect this situation, this change also adds an LValueClassification of LV_ArrayTemporary for temporaries of array type which aren't subobjects of class temporaries. These occur in C++11 T{...} and GNU C++ (T){...} expressions, when T is an array type. Previously we treated the former as a generic prvalue and the latter as a class temporary. llvm-svn: 157955
* [objcmt] Don't migrate to subscripting syntax if the required methods have notArgyrios Kyrtzidis2012-06-042-11/+52
| | | | | | | | been declared on NSArray/NSDictionary. rdar://11581975 llvm-svn: 157951
* [analyzer] Fix a diagnostics bug which lead to a crash on the buildbot.Anna Zaks2012-06-041-0/+5
| | | | | | | This bug was triggered by r157851. It only happens in the case where we don't perform optimal diagnostic pruning. llvm-svn: 157950
* objective-c: Handle more warning cases for whenFariborz Jahanian2012-06-041-0/+17
| | | | | | | message receiver is 'weak' property. // rdar://10225276 llvm-svn: 157946
* Fixed a problem related to resolution of built-in headers in case a path of ↵Alexander Kornienko2012-06-041-25/+15
| | | | | | tool's binary contains sym-links. llvm-svn: 157944
* Removing the lambda extension warning concerning single return statements, ↵Aaron Ballman2012-06-041-20/+0
| | | | | | as it no longer applies. llvm-svn: 157943
* Remove AST and Parse from Driver's dependencies.Jordan Rose2012-06-041-1/+1
| | | | llvm-svn: 157933
* Require -pie when linking with ASan on Android.Evgeniy Stepanov2012-06-041-0/+2
| | | | llvm-svn: 157923
* Add fma3 intrinsic header file.Craig Topper2012-06-043-0/+234
| | | | llvm-svn: 157913
* When adding built-in operator candidates for overload resolutionDouglas Gregor2012-06-041-26/+110
| | | | | | | | involving 'restrict', place restrict on the pointer type rather than on the pointee type. Also make sure that we gather restrict from the pointer type. Fixes PR12854 and the major part of PR11093. llvm-svn: 157910
* Make disabling SSE levels also disable AVX and FMA.Craig Topper2012-06-031-6/+13
| | | | llvm-svn: 157907
* Make AES and PCLMUL features imply SSE2 as that's needed to get the right ↵Craig Topper2012-06-031-3/+4
| | | | | | types defined. llvm-svn: 157906
* Add fma feature flag for Intel FMA instructions.Craig Topper2012-06-031-2/+21
| | | | llvm-svn: 157904
* Improve fixit for comparison operator on lhs of bitwise operator.Nico Weber2012-06-031-1/+1
| | | | | | | | | | | | | | | | Before: test.cc:2:18: note: place parentheses around the == expression to silence this warning if (0 == flags & 0xdd) ^ ( ) Now: test.cc:2:18: note: place parentheses around the == expression to silence this warning if (0 == flags & 0xdd) ^ ( ) llvm-svn: 157897
* Initialize the non-target-dependent fields of the Preprocessor in its ↵Argyrios Kyrtzidis2012-06-021-48/+47
| | | | | | | | | | | constructor so we can destroy it even if it was constructed with "DelayInitialization = true", and we didn't end up calling Preprocessor::Initialize. Fixes crashes in rdar://11558355 llvm-svn: 157892
* ToolInvocation::mapVirtualFile(): Tweak for Win32. Handle the key as native ↵NAKAMURA Takumi2012-06-021-1/+3
| | | | | | path. llvm-svn: 157889
* MIPS: Factor out code selects the float ABI as determined by -msoft-float,Simon Atanasyan2012-06-021-15/+22
| | | | | | | -mhard-float, and -mfloat-abi= to the new function getMipsFloatABI. That simplifies reuse of this code. llvm-svn: 157888
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-028-10/+10
| | | | llvm-svn: 157886
* Implementation of a "soft opt-in" option for -Wimplicit-fallthrough ↵Alexander Kornienko2012-06-021-5/+16
| | | | | | diagnostics: -Wimplicit-fallthrough-per-method llvm-svn: 157871
* [analyzer] Rely on canBeInlined utility instead of checking CallExprAnna Zaks2012-06-022-2/+3
| | | | | | | | explicitly. This will make it easier to add inlining support to more expressions. llvm-svn: 157870
* [analyzer] Fix a spurious undef value warning.Anna Zaks2012-06-011-1/+9
| | | | | | | | | | | | When we timeout or exceed a max number of blocks within an inlined function, we retry with no inlining starting from a node right before the CallEnter node. We assume the state of that node is the state of the program before we start evaluating the call. However, the node pruning removes this node as unimportant. Teach the node pruning to keep the predecessors of the call enter nodes. llvm-svn: 157860
* [analyzer] Fix lack of coverage after empty inlined function.Anna Zaks2012-06-011-0/+2
| | | | | | | We should not stop exploring the path after we return from an empty function. llvm-svn: 157859
* Disable diagnosic path pruning for ReturnUndefChecker.Ted Kremenek2012-06-011-0/+1
| | | | llvm-svn: 157851
* static analyzer: add inlining support for directly called blocks.Ted Kremenek2012-06-015-69/+180
| | | | llvm-svn: 157833
* Don't allow multiple correction candidates that have the same identifierKaelyn Uhrain2012-06-011-25/+53
| | | | | | | | but different nested name specifiers to quietly clobber each other so only one remains if they do not refer to the same NamedDecl. Fixes PR12951. llvm-svn: 157823
* Support C++11 enum forward declarations.Eric Christopher2012-06-011-1/+2
| | | | | | Part of rdar://11570854 llvm-svn: 157787
* [arcmt] Use CFBridgingRetain/CFBridgingRelease instead of ↵Argyrios Kyrtzidis2012-06-014-25/+58
| | | | | | | | | | __bridge_retained/__bridge_transfer when migrating. rdar://11569198 llvm-svn: 157785
* Anonymous union members within a struct are now properly handled as an ↵Aaron Ballman2012-06-011-1/+1
| | | | | | unevaluated field in C++11 mode. This fixes PR12866. llvm-svn: 157784
* In TypoCorrectionConsumer, BestResults to CorrectionResults to lessenKaelyn Uhrain2012-05-311-14/+19
| | | | | | | | | | the confusion among all of the uses of Best* in relation to the set of possible typo correction results. Also add a method to return the set of typo corrections that have the single best edit distance--it returns the second half of the first pair in TypoEditDistanceMap (with getBestEditDistance already returning the first half). llvm-svn: 157781
* objc: properties of NSObject attribute mustFariborz Jahanian2012-05-311-1/+9
| | | | | | | have correct pointer type or issue error, instead of crashing in IRGen. // rdar:// 11569860 llvm-svn: 157780
* [analyzer] Fix BugType memory leak in IdempotentOperationChecker.Tom Care2012-05-311-1/+4
| | | | llvm-svn: 157772
* [analyzer] Cleanup for r157721.Anna Zaks2012-05-311-11/+9
| | | | | | | | | | We should lock the number of elements after the initial parsing is complete. Recursive AST visitors in AnalyzesConsumer and CallGarph can trigger lazy pch deserialization resulting in more calls to HandleTopLevelDecl and appending to the LocalTUDecls list. We should ignore those. llvm-svn: 157762
OpenPOWER on IntegriCloud