- Sep 02, 2013
-
-
Chandler Carruth authored
fallback syntax used when we fail to find a '.clang-format' file. Adjust variable names appropriately. Update the editor integration pieces that specify a '-style' option to specify it as '-style=file'. I left the functionality in place because even if the preferred method is to use '.clang-format' files, this way if someone needs to clobber the style in their editor we show how to do so in these examples. Also check in a '.clang-format' file for Clang to ensure that separate checkouts and builds of Clang from LLVM can still get the nice formatting. =] This unfortunately required nuking the test for the absence of a '.clang-format' file as now the directory happening to be under your clang source tree will cause there to always be a file. ;] llvm-svn: 189741
-
- Sep 01, 2013
-
-
Aaron Ballman authored
llvm-svn: 189731
-
- Aug 31, 2013
-
-
Benjamin Kramer authored
llvm-svn: 189721
-
Richard Trieu authored
InitializedEntity::EntityKind as an index for one of its %select. Over time, EntityKind has been expanded, but the diagnostic text has not been updated. This adds additional text to the %select to cover the new enum values. A comment has been added to the end of the enum regarding this situation. This fixes the crasher in PR17043. llvm-svn: 189716
-
Aaron Ballman authored
llvm-svn: 189712
-
Aaron Ballman authored
llvm-svn: 189711
-
Eric Christopher authored
llvm-svn: 189710
-
Eric Christopher authored
a windows compatible builtin header. Currently uses x86intrin.h for implementing intel intrinsics in a clang specific manner. llvm-svn: 189709
-
Fariborz Jahanian authored
of some sort (but not an object, block pointer or CF pointers), and is not annotated with the objc_returns_inner_pointer attribute, we should suggest NS_RETURNS_INNER_POINTER annotation for these methods. llvm-svn: 189707
-
DeLesley Hutchins authored
Patch by chris.wailes@gmail.com Adds the 'consumable' attribute that can be attached to classes. This replaces the previous method of scanning a class's methods to see if any of them have consumed analysis attributes attached to them. If consumed analysis attributes are attached to methods of a class that isn't marked 'consumable' a warning is generated. llvm-svn: 189702
-
- Aug 30, 2013
-
-
Jordan Rose authored
This will never happen in the analyzed code code, but can happen for checkers that over-eagerly dereference pointers without checking that it's safe. UnknownVal is a harmless enough value to get back. Fixes an issue added in r189590, caught by our internal buildbot. llvm-svn: 189688
-
Fariborz Jahanian authored
specified NSUInteger as the followup typedef. With this change, NS_OPTIONS is only inferred based on looking up how enumerators are speficied (if they her hexadecimal, power of 2, or have bitwise constant expressions). llvm-svn: 189682
-
Samuel Benzaquen authored
Reduce the number of symbols by changing how templates are instantiated per function bound in the registry. Summary: Reduce the number of symbols by changing how templates are instantiated per function bound in the registry. This change reduces the number of sections in Registry.cpp.o by a little over 10%. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1557 llvm-svn: 189676
-
Benjamin Kramer authored
llvm-svn: 189670
-
Hans Wennborg authored
llvm-svn: 189664
-
Daniel Jasper authored
Almost by accident, clang-format seems to be able to format protocol buffer definitions (https://code.google.com/p/protobuf/). The only change is that a space is required between numeric constants and opening square brackets (for default values). While this might in theory be used for array subscripts (int val = 4[MyArray]), I have not seen this pattern in practice much. If this is wrong, we can make this smarter in the future. llvm-svn: 189663
-
Daniel Jasper authored
Before: namespace n { enum Type { One, Two, // missing }; int i; } void g() { } After: namespace n { enum Type { One, Two, // missing }; int i; } void g() {} llvm-svn: 189662
-
Hans Wennborg authored
This never really worked. Even if we find and execute link.exe in the VS bin dir this way, link.exe wouldn't find the DLLs it needs, libraries, etc. It also causes trouble when the user has multiple versions of VS installed, one of them is in the path, but this code finds the other one (PR17041). Revert until we can fix this properly. > Windows ToolChain: add VS bin dir to PogramPaths > > We have a lot of fancy logic to find Visual Studio, which is currently used > to set the system header include paths. > > Use the same code to set the ProgramPaths, which is used for finding programs > such as link.exe. Previously, Clang would just search PATH for link.exe, > but now it should find it if it's able to find Visual Studio. llvm-svn: 189661
-
Yunzhong Gao authored
llvm-svn: 189660
-
Pavel Labath authored
Summary: Previously, Sema was reusing parts of the AST when synthesizing an assignment operator, turning it into a AS-dag. This caused problems for the static analyzer, which assumed an expression appears in the tree only once. Here I make sure to always create a fresh Expr, when inserting something into the AST, fixing PR16745 in the process. Reviewers: doug.gregor CC: cfe-commits, jordan_rose Differential Revision: http://llvm-reviews.chandlerc.com/D1425 llvm-svn: 189659
-
Daniel Jasper authored
Before: aaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc( dddddddddddddddddddddddddddddd)); aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb( dddddddddddddddddddddddddddddd)); After: aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc( dddddddddddddddddddddddddddddd)); aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb( dddddddddddddddddddddddddddddd)); This was overlooked when interducing the new builder-type call detection in r189337. Also, some minor reorganization of a test. llvm-svn: 189658
-
Daniel Jasper authored
While this looks kind of nice, it wastes horizontal space and does not seem to be common in the LLVM codebase. Before: return llvm::StringSwitch<Reference::Kind>(name) .StartsWith(".eh_frame_hdr", ORDER_EH_FRAMEHDR) .StartsWith(".eh_frame", ORDER_EH_FRAME) .StartsWith(".init", ORDER_INIT) .StartsWith(".fini", ORDER_FINI) .StartsWith(".hash", ORDER_HASH) .Default(ORDER_TEXT); After: return llvm::StringSwitch<Reference::Kind>(name) .StartsWith(".eh_frame_hdr", ORDER_EH_FRAMEHDR) .StartsWith(".eh_frame", ORDER_EH_FRAME) .StartsWith(".init", ORDER_INIT) .StartsWith(".fini", ORDER_FINI) .StartsWith(".hash", ORDER_HASH) .Default(ORDER_TEXT); llvm-svn: 189657
-
Daniel Jasper authored
Before: aaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaa()->aaaaaaaaaaaaaae( 0)->aaaaaaaaaaaaaaa(); After: aaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaa() ->aaaaaaaaaaaaaae(0) ->aaaaaaaaaaaaaaa(); llvm-svn: 189655
-
Yunzhong Gao authored
The patch was discussed in Phabricator. See: http://llvm-reviews.chandlerc.com/D1281 llvm-svn: 189649
-
Richard Smith authored
llvm-svn: 189647
-
Richard Smith authored
from a PCH/module. llvm-svn: 189646
-
Richard Smith authored
llvm-svn: 189645
-
Charles Davis authored
Based on a patch by Benno Rice! llvm-svn: 189644
-
Eric Christopher authored
again. This test should a) test IR or be moved, and b) get an actual option for the dwarf pub sections. llvm-svn: 189633
-
Richard Smith authored
llvm-svn: 189629
-
Fariborz Jahanian authored
should infer migration to NS_OPTIONS. llvm-svn: 189628
-
Richard Smith authored
these in eagerly if we're not actually processing a translation unit. The added laziness here also avoids us loading in parts of a CXXRecordDecl earlier than an upcoming class template specialization merging patch would like. Ideally, we should mark the vtable as used when we see a definition for the key function, rather than having a separate pass over dynamic classes at the end of the TU. The existing approach is pretty bad for PCH/modules, since it forcibly loads the declarations of all key functions in all imported modules, whether or not those key functions are defined. llvm-svn: 189627
-
Eli Friedman authored
I changed the diagnostic printing code because it's probably better to cut off a digit from DBL_MAX than to print something like 1.300000001 when the user wrote 1.3. llvm-svn: 189625
-
Manman Ren authored
We use CXX mangler to generate unique identifier for external C++ struct, union, class and enum. Types with unique identifier are added to retained types by DIBuilder. Testing cases are updated to reflect the unique identifier generated for types. The order of MDNodes is changed because of retained types and testing cases are updated accordingly. Testing case debug-info-uuid.cpp now emits error with Itanium mangler, since uuid is not yet handled in Itanium mangler. And it will check for the error message. llvm-svn: 189622
-
DeLesley Hutchins authored
Patch by chris.wailes@gmail.com. llvm-svn: 189616
-
- Aug 29, 2013
-
-
DeLesley Hutchins authored
unknown state. Patch by chris.wailes@gmail.com. llvm-svn: 189612
-
Manman Ren authored
We had further discussions on how to retain types, whether to do it in front end or in DIBuilder. And we agree to do it in DIBuilder so front ends generating unique identifier do not need to worry about retaining them. llvm-svn: 189609
-
Aaron Ballman authored
llvm-svn: 189606
-
Aaron Ballman authored
Silencing a rather spurious warning from MSVC 11 about not all control paths returning a value (hint: they do). llvm-svn: 189605
-
Manman Ren authored
We use CXX mangler to generate unique identifier for external C++ struct, union, class and enum. Types with unique identifier are added to RetainedTypes to make sure they are treated as used even when all uses are replaced with the identifiers. A single type can be added to RetainedTypes multiple times. For example, both createForwardDecl and createLimitedType can add the same type to RetainedTypes. A set is used to avoid duplication when updating AllRetainTypes in DIBuilder. Testing cases are updated to reflect the unique identifier generated for types. The order of MDNodes is changed because of retained types and testing cases are updated accordingly. Testing case debug-info-uuid.cpp now emits error with Itanium mangler, since uuid is not yet handled in Itanium mangler. We choose to update RetainedTypes in clang, then at finalize(), we update AllRetainTypes in DIBuilder. The other choice is to update AllRetainTypes in DIBuilder when creating a DICompositeType with unique identifier. This option requires using ValueHandle for AllRetainTypes in DIBuilder since the created DICompositeType can be modified later on by setContainingType etc. llvm-svn: 189600
-