summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow the computation of the base priority for a declaration code completion ↵Douglas Gregor2013-01-312-47/+65
| | | | | | result to consider the completion context llvm-svn: 174037
* Replace "failed template argument deduction" diagnostic with something usefulRichard Smith2013-01-312-7/+30
| | | | | | in the one case where we've already factored out a reason code. llvm-svn: 174036
* Remove elements from Sema.UndefinedInternals as functions are defined. AlsoNick Lewycky2013-01-315-33/+65
| | | | | | | filter the elements before emitting them into a PCH. No user-visible functionality change, except that PCH files may be smaller? llvm-svn: 174034
* Fix grammar in comment.Nick Lewycky2013-01-311-1/+1
| | | | llvm-svn: 174033
* Clarify the diagnostic for -Wnested-anon-types.Richard Smith2013-01-311-1/+2
| | | | llvm-svn: 174032
* [analyzer] If a lazy binding is undefined, pretend that it's unknown instead.Jordan Rose2013-01-311-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | This is a hack to work around the fact that we don't track extents for our default bindings: CGPoint p; p.x = 0.0; p.y = 0.0; rectParam.origin = p; use(rectParam.size); // warning: uninitialized value in rectParam.size.width In this case, the default binding for 'p' gets copied into 'rectParam', because the 'origin' field is at offset 0 within CGRect. From then on, rectParam's old default binding (in this case a symbol) is lost. This patch silences the warning by pretending that lazy bindings are never made from uninitialized memory, but not only is that not true, the original default binding is still getting overwritten (see FIXME test cases). The long-term solution is tracked in <rdar://problem/12701038> PR14765 and <rdar://problem/12875012> llvm-svn: 174031
* When comparing two template template arguments in the template differ, considerRichard Trieu2013-01-311-5/+14
| | | | | | | | | | | them the same if they are actually the same; having the same name isn't enough. Similar to r174013, template template arguments were also mistakenly considered the same when they had the same name but were in different namespaces. In addition, when printing template template arguments, use the qualified name if the regular name is the same. llvm-svn: 174029
* Fix -Wcovered-switch-default and -Wunused-private-field warnings.Richard Smith2013-01-311-19/+17
| | | | llvm-svn: 174025
* Add indents to AST dumping and removed parenthesis from AST nodes.Richard Trieu2013-01-311-44/+280
| | | | | | | | | | | | | | | | | | | | | Indents were given the color blue when outputting with color. AST dumping now looks like this: Node |-Node | `-Node `-Node `-Node Compared to the previous: (Node (Node (Node)) (Node (Node))) llvm-svn: 174022
* Fix ODR-use of a MemberExpr to check before marking a pure function used. RemoveNick Lewycky2013-01-312-3/+13
| | | | | | a workaround for this bug from the -Wundefined-internals warning. llvm-svn: 174020
* [analyzer] Fix a bug in region store that lead to undefined value falseAnna Zaks2013-01-311-16/+8
| | | | | | | | | | positives. The includeSuffix was only set on the first iteration through the function, resulting in invalid regions being produced by getLazyBinding (ex: zoomRegion.y). llvm-svn: 174016
* When comparing two templates in the template differ, consider them theDouglas Gregor2013-01-311-2/+2
| | | | | | | same if they are actually the same; having the same name isn't enough. Fixes <rdar://problem/12931988>. llvm-svn: 174013
* Make sure that the Attribute object represents one attribute only.Bill Wendling2013-01-315-22/+31
| | | | | | | | Several places were still treating the Attribute object as respresenting multiple attributes. Those places now use the AttributeSet to represent multiple attributes. llvm-svn: 174004
* Fix unused variable warnings in -asserts buildMatt Beaumont-Gay2013-01-311-2/+2
| | | | llvm-svn: 173996
* Reinstate r173952, this time limiting it to exactly the formDouglas Gregor2013-01-301-1/+4
| | | | | | | | #define X X for which there is no point warning, ever. llvm-svn: 173991
* Diagnostics: Clarify name of line-length-limiting constant in r173976.Jordan Rose2013-01-301-3/+3
| | | | | | Thanks, Sean. llvm-svn: 173981
* Changed to static_cast, due to post-commit review.Filipe Cabecinhas2013-01-301-2/+2
| | | | llvm-svn: 173980
* Cast to remove the narrowing conversion error in c++11.Filipe Cabecinhas2013-01-301-2/+2
| | | | llvm-svn: 173978
* Diagnostics: if a line is longer than 4096 characters, don't print it.Jordan Rose2013-01-301-1/+9
| | | | | | | | | | | | | Specifically, don't print snippets, caret diagnostics, or ranges for lines over 4096 characters. We copy the line around a few times in our diagnostics machinery, and we have to print a caret line that's just as long. This uses a lot of memory just to create a poor user experience as we print out a line much too long for anyone to read...or spend extra energy trying to fit it to -fmessage-length. <rdar://problem/13106850> llvm-svn: 173976
* Revert "[preprocessor] Don't warn about "disabled expansion of recursive macro""Argyrios Kyrtzidis2013-01-301-4/+1
| | | | | | This reverts commit r173952 llvm-svn: 173970
* Handle passing non-Qualtypes to %diff better. Instead of asserting, fall backRichard Trieu2013-01-301-5/+23
| | | | | | to printing the default case. This is a fix for PR15023. llvm-svn: 173965
* Add OpenCL error that a kernel function must have void return type. Includes ↵Tanya Lattner2013-01-301-1/+8
| | | | | | a test case. llvm-svn: 173963
* Fix r173881 to properly skip invalid UTF-8 characters in raw lexing and -E.Jordan Rose2013-01-301-0/+1
| | | | | | | | 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-303-5/+39
| | | | | | | | | | | | | | | | 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-303-4/+7
| | | | llvm-svn: 173957
* [analyzer] Move report false positive suppression to report visitors.Anna Zaks2013-01-302-34/+38
| | | | llvm-svn: 173956
* [analyzer] Remove further references to analyzer-ipa.Anna Zaks2013-01-301-2/+2
| | | | | | Thanks Jordan! llvm-svn: 173955
* 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-301-1/+4
| | | | | | | | | 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-302-14/+75
| | | | | | | | | | | | | | | | | | | | | | 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
* Comment parsing: resolve more named character referencesDmitri Gribenko2013-01-302-182/+23
| | | | | | | | | 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
* Move UTF conversion routines from clang/lib/Basic to llvm/lib/SupportDmitri Gribenko2013-01-3012-668/+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-301-4/+8
| | | | | | | | __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-301-0/+5
| | | | | | No functional changes. llvm-svn: 173916
* Add "instancetype" as a code completion result for the return type ofDouglas Gregor2013-01-301-0/+5
| | | | | | 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-301-2/+6
| | | | | | | 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-301-0/+2
| | | | llvm-svn: 173900
* Semantic analysis and CodeGen support for C11's _Noreturn. This is modeled asRichard Smith2013-01-303-8/+17
| | | | | | an attribute for consistency with our other noreturn mechanisms. llvm-svn: 173898
* Don't warn on fall-through from unreachable code.Alexander Kornienko2013-01-301-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Don't warn about Unicode characters in -E mode.Jordan Rose2013-01-303-21/+65
| | | | | | | | | | | | | | | 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
* Provide a fixit for constexpr non-static data members.David Blaikie2013-01-303-7/+33
| | | | | | | | | | | | | | | | 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-301-1/+2
| | | | | | | | 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-303-6/+2
| | | | llvm-svn: 173866
* [Frontend] Add an ExternCSystem include entry group.Daniel Dunbar2013-01-304-81/+77
| | | | | | | | - 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
OpenPOWER on IntegriCloud