summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix comment in test/Lexer/utf8-invalid.c for updates in r173959.Jordan Rose2013-01-301-2/+1
| | | | llvm-svn: 173961
* Fix r173881 to properly skip invalid UTF-8 characters in raw lexing and -E.Jordan Rose2013-01-302-0/+7
| | | | | | | | This caused hangs as we processed the same invalid byte over and over. <rdar://problem/13115651> llvm-svn: 173959
* [analyzer] Make shallow mode more shallow.Anna Zaks2013-01-307-12/+53
| | | | | | | | | | | | | | | | Redefine the shallow mode to inline all functions for which we have a definite definition (ipa=inlining). However, only inline functions that are up to 4 basic blocks large and cut the max exploded nodes generated per top level function in half. This makes shallow faster and allows us to keep inlining small functions. For example, we would keep inlining wrapper functions and constructors/destructors. With the new shallow, it takes 104s to analyze sqlite3, whereas the deep mode is 658s and previous shallow is 209s. llvm-svn: 173958
* [analyzer] Use analyzer config for max-inlinable-size option.Anna Zaks2013-01-307-16/+21
| | | | llvm-svn: 173957
* [analyzer] Move report false positive suppression to report visitors.Anna Zaks2013-01-304-39/+65
| | | | llvm-svn: 173956
* [analyzer] Remove further references to analyzer-ipa.Anna Zaks2013-01-303-40/+37
| | | | | | Thanks Jordan! llvm-svn: 173955
* scan-build: When using Xcode 4.6, use build settings for doing proper build ↵Ted Kremenek2013-01-301-0/+30
| | | | | | interposition. llvm-svn: 173954
* Hoist retrieval of Expr* into caller. No functionality change.Ted Kremenek2013-01-301-6/+6
| | | | | | Just makes the code a little cleaner, and easier to reason about. llvm-svn: 173953
* [preprocessor] Don't warn about "disabled expansion of recursive macro"Argyrios Kyrtzidis2013-01-303-2/+10
| | | | | | | | | for "#define X X". This is a pattern that, for example, stdbool.h uses. rdar://12435773 llvm-svn: 173952
* [analyzer] Model trivial copy/move ctors with an aggregate bind.Jordan Rose2013-01-305-17/+183
| | | | | | | | | | | | | | | | | | | | | | This is faster for the analyzer to process than inlining the constructor and performing a member-wise copy, and it also solves the problem of warning when a partially-initialized POD struct is copied. Before: CGPoint p; p.x = 0; CGPoint p2 = p; <-- assigned value is garbage or undefined After: CGPoint p; p.x = 0; CGPoint p2 = p; // no-warning This matches our behavior in C, where we don't see a field-by-field copy. <rdar://problem/12305288> llvm-svn: 173951
* Documentation: fix escaping in JSON exampleDmitri Gribenko2013-01-301-1/+1
| | | | llvm-svn: 173950
* Documentation: add a link to Bear, a tool to help with JSON DBDmitri Gribenko2013-01-301-0/+3
| | | | | | Patch by Laszlo Nagy llvm-svn: 173949
* Documentation: fix link to ExecuteAction(), which was previously typoed asJames Dennett2013-01-301-1/+1
| | | | | | "ExecutionAction()". llvm-svn: 173948
* Comment parsing: fold named character references test into other HTML testsDmitri Gribenko2013-01-302-30/+35
| | | | llvm-svn: 173934
* Comment parsing: resolve more named character referencesDmitri Gribenko2013-01-3010-190/+306
| | | | | | | | | This reimplements r173850 with a better approach: (1) use a TableGen-generated matcher instead of doing a linear search; (2) avoid allocations for new strings by converting code points to string iterals with TableGen. llvm-svn: 173931
* Revert unintended changeDmitri Gribenko2013-01-301-1/+0
| | | | llvm-svn: 173927
* Index/special-html-characters.m: mark this as XFAIL for valgrindDmitri Gribenko2013-01-301-0/+2
| | | | | | Fix is being discussed on cfe-dev. llvm-svn: 173925
* Move UTF conversion routines from clang/lib/Basic to llvm/lib/SupportDmitri Gribenko2013-01-3013-898/+25
| | | | | | This is required to use them in TableGen. llvm-svn: 173924
* Also promote fp16 types to double when they're anonymous variadic arguments.Tim Northover2013-01-302-4/+21
| | | | | | | | __fp16 isn't covered by the standard, but this resolves the oddity that float gets promoted when passed variadically, but not the smaller type. This is required by the AArch64 ABI, and a sane action elsewhere. llvm-svn: 173918
* Don't generate no-op replacements.Daniel Jasper2013-01-302-0/+21
| | | | | | No functional changes. llvm-svn: 173916
* Add "instancetype" as a code completion result for the return type ofDouglas Gregor2013-01-302-0/+16
| | | | | | an Objective-C method. Fixes <rdar://problem/13069990>. llvm-svn: 173905
* The instance methods of the root class of an Objective-C hieararchyDouglas Gregor2013-01-303-4/+8
| | | | | | | can be messaged via the metaclass. Provide code completions for this case. Fixes <rdar://problem/12560296>. llvm-svn: 173903
* C11: Provide the missing half of <stdalign.h>Richard Smith2013-01-302-0/+8
| | | | llvm-svn: 173900
* Fix test failure from previous change.Richard Smith2013-01-301-0/+1
| | | | llvm-svn: 173899
* Semantic analysis and CodeGen support for C11's _Noreturn. This is modeled asRichard Smith2013-01-306-11/+32
| | | | | | an attribute for consistency with our other noreturn mechanisms. llvm-svn: 173898
* Don't warn on fall-through from unreachable code.Alexander Kornienko2013-01-302-10/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A motivating example: class ClassWithDtor { public: ~ClassWithDtor() {} }; void fallthrough3(int n) { switch (n) { case 2: do { ClassWithDtor temp; return; } while (0); // This generates a chain of unreachable CFG blocks. case 3: break; } } Reviewers: rsmith, doug.gregor, alexfh Reviewed By: alexfh CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D330 llvm-svn: 173889
* Unresolved lookups can have using declarations that refer toDouglas Gregor2013-01-302-1/+10
| | | | | | unresolved using declarations. Fixes PR14768 / <rdar://problem/13030296>. llvm-svn: 173883
* Don't warn about Unicode characters in -E mode.Jordan Rose2013-01-306-22/+88
| | | | | | | | | | | | | | | People use the C preprocessor for things other than C files. Some of them have Unicode characters. We shouldn't warn about Unicode characters appearing outside of identifiers in this case. There's not currently a way for the preprocessor to tell if it's in -E mode, so I added a new flag, derived from the PreprocessorOutputOptions. This is only used by the Unicode warnings for now, but could conceivably be used by other warnings or even behavioral differences later. <rdar://problem/13107323> llvm-svn: 173881
* [Sema] Constrain test added in r173873 with expected-error-reDavid Blaikie2013-01-301-2/+1
| | | | | | Suggested in post-commit review by Richard Smith. llvm-svn: 173880
* Provide a fixit for constexpr non-static data members.David Blaikie2013-01-306-8/+50
| | | | | | | | | | | | | | | | If the member has an initializer, assume it was probably intended to be static and suggest/recover with that. If the member doesn't have an initializer, assume it was probably intended to be const instead of constexpr and suggest that. (if the attempt to apply these changes fails, don't make any suggestion & produce the same diagnostic experience as before. The only case where this can come up that I know of is with a mutable constexpr with an initializer, since mutable is incompatible with static (but it's already incompatible with const anyway)) llvm-svn: 173873
* c: When checking on validity of sizeof passed as size ofFariborz Jahanian2013-01-302-1/+17
| | | | | | | | argument to be memset, check for its type to be complete before calling Context.getTypeSize(PointeeTy) to prevent crash. // rdar://13081751. llvm-svn: 173872
* [Frontend] Factor AddUnmappedPath() out of AddPath() and simplify.Daniel Dunbar2013-01-301-15/+33
| | | | llvm-svn: 173871
* [Frontend] Remove HeaderSearchOptions::Entry::IsInternal, which is unused.Daniel Dunbar2013-01-304-19/+7
| | | | llvm-svn: 173866
* clang/test/Driver/asan-ld.c: Try not to mismatch temporary file, like ↵NAKAMURA Takumi2013-01-301-5/+5
| | | | | | | | "tmpkcfdld". If we had the regular expression "\b" in FileCheck like Perl... llvm-svn: 173861
* [Frontend] Remove actual ImplicitExternC member variable.Daniel Dunbar2013-01-301-3/+0
| | | | llvm-svn: 173860
* [Frontend] Add an ExternCSystem include entry group.Daniel Dunbar2013-01-305-88/+83
| | | | | | | | - The only group where it makes sense for the "ExternC" bit is System, so this simplifies having to have the extra isCXXAware (or ImplicitExternC, depending on what code you talk to) bit caried around. llvm-svn: 173859
* Removed couple of html named character references inFariborz Jahanian2013-01-301-2/+0
| | | | | | my last patch. llvm-svn: 173856
* [Frontend] Make the include dir group independent from the "use sysroot" bit.Daniel Dunbar2013-01-292-8/+6
| | | | | | | | | - This slightly decouples the path handling, since before the group sometimes dominated the "use sysroot" bit, but it was still passed in via the API. - No functionality change. llvm-svn: 173855
* [Frontend] Rename a member variable to clarify its intent.Daniel Dunbar2013-01-291-5/+6
| | | | llvm-svn: 173854
* [Frontend] Factor out helper function, for clarity.Daniel Dunbar2013-01-291-9/+10
| | | | llvm-svn: 173853
* [driver] Clear the FailureResultFiles when initializing clang diagnostics. Also,Chad Rosier2013-01-292-6/+7
| | | | | | minor cleanup. llvm-svn: 173852
* [Doc parsing] Patch to parse Doxygen-supported HTML character Fariborz Jahanian2013-01-293-18/+216
| | | | | | | references to their UTIF-8 encoding. Reviewed offline by Doug. // rdar://12392215 llvm-svn: 173850
* [ubsan] Implement the -fcatch-undefined-behavior flag using a trappingChad Rosier2013-01-2912-13/+251
| | | | | | | | | | | implementation; this is much more inline with the original implementation (i.e., pre-ubsan) and does not require run-time library support. The trapping implementation can be invoked using either '-fcatch-undefined-behavior' or '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error', with the latter being preferred. Eventually, the -fcatch-undefined-behavior' flag will be removed. llvm-svn: 173848
* clang/test/Index/getcursor-preamble.m: Formatting.NAKAMURA Takumi2013-01-291-1/+2
| | | | llvm-svn: 173844
* clang/test/Index/getcursor-preamble.m: Tweak for win32. env(1) is required ↵NAKAMURA Takumi2013-01-291-1/+2
| | | | | | to change variables locally. llvm-svn: 173843
* Move -Wstatic-float-init fixit into a note & don't recover as if constexprDavid Blaikie2013-01-296-15/+14
| | | | llvm-svn: 173841
* Don't fixit/recover from -Wstatic-float-init when it's not an error.David Blaikie2013-01-292-7/+11
| | | | | | | Fix to change r173414 that lead to Clang changing const to constexpr even under -Wno-static-float-init. llvm-svn: 173835
* Move the token annotator into separate files.Daniel Jasper2013-01-297-1039/+1105
| | | | | | | No functional changes. Also removed experimental-warning from all of clang-format's files, as it is no longer accurate. llvm-svn: 173830
* [Preprocessor] When checking if we can concatenate two tokens, checkArgyrios Kyrtzidis2013-01-292-3/+10
| | | | | | | | | | | | if they were already concatenated in source using the spelling locations even if they came from a macro expansion. This fixes an issue where a GUID passed as macro argument ends up malformed after preprocessing because we added spaces inside it. rdar://13016645 llvm-svn: 173826
* [driver] Refactor the driver so that a failing commands doesn't preventChad Rosier2013-01-296-55/+90
| | | | | | | | | | | subsequent commands from being executed. The diagnostics generation isn't designed for this use case, so add a note to fix this in the very near future. For now, just generated the diagnostics for the first failing command. Part of rdar://12984531 llvm-svn: 173825
OpenPOWER on IntegriCloud