summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* clang-format: [Java] Fix more generics formatting.Daniel Jasper2014-11-031-1/+1
| | | | | | | | | | Before: < T extends B > T getInstance(Class<T> type); After: <T extends B> T getInstance(Class<T> type); llvm-svn: 221124
* clang-format: [Java] Fix static generic methods.Daniel Jasper2014-11-031-0/+2
| | | | | | | | | | Before: public static<R> ArrayList<R> get() {} After: public static <R> ArrayList<R> get() {} llvm-svn: 221122
* clang-format: [Java] Fix class declaration formatting.Daniel Jasper2014-11-032-4/+8
| | | | | | | | | | | | | | | | Before: @SomeAnnotation() abstract class aaaaaaaaaaaa extends bbbbbbbbbbbbbbb implements cccccccccccc { } After: @SomeAnnotation() abstract class aaaaaaaaaaaa extends bbbbbbbbbbbbbbb implements cccccccccccc { } llvm-svn: 221121
* clang-format: Fix false positive in lambda detection.Daniel Jasper2014-11-021-1/+2
| | | | | | | | | | | | Before: delete [] a -> b; After: delete[] a->b; This fixes part of llvm.org/PR21419. llvm-svn: 221114
* clang-format: [Java] Support enums without trailing semicolon.Daniel Jasper2014-11-021-0/+3
| | | | | | | | | | | | | | | | | | | Before: class SomeClass { enum SomeThing { ABC, CDE } void f() { } } After: class SomeClass { enum SomeThing { ABC, CDE } void f() { } } This fixed llvm.org/PR21458. llvm-svn: 221113
* clang-format: [Java] Don't break imports.Daniel Jasper2014-11-021-3/+3
| | | | | | This fixes llvm.org/PR21453. llvm-svn: 221112
* clang-format: [Java] Add space between "synchronized" and "(".Daniel Jasper2014-11-021-0/+3
| | | | | | | | | | | | | | | | Before: synchronized(mData) { // ... } After: synchronized (mData) { // ... } This fixes llvm.org/PR21455. llvm-svn: 221110
* clang-format: [Java] Support generics with "?".Daniel Jasper2014-11-021-1/+8
| | | | | | | | | | | | | | | | | | | Before: @Override public Map < String, ? > getAll() { // ... } After: @Override public Map<String, ?> getAll() { // ... } This fixes llvm.org/PR21454. llvm-svn: 221109
* clang-format: [Java] Support try/catch/finally blocks.Daniel Jasper2014-11-021-1/+2
| | | | llvm-svn: 221104
* clang-format: [Java] Don't break after extends/implements.Daniel Jasper2014-11-023-7/+23
| | | | | | | | | | | | Before: abstract class SomeClass extends SomeOtherClass implements SomeInterface {} After: abstract class SomeClass extends SomeOtherClass implements SomeInterface {} llvm-svn: 221103
* [PowerPC] Change PPCTargetInfo::hasFeature() to use StringSwitchBill Schmidt2014-11-021-3/+5
| | | | | | Implement post-commit comment on r220989 from Eric Christopher. llvm-svn: 221099
* Add _lzcnt_u32 and _lzcnt_u64 to lzcntintrin.h to match Intel documentation ↵Craig Topper2014-11-011-0/+12
| | | | | | names for these intrinsics. llvm-svn: 221066
* Avoid undefined behavior in the x86 bmi header file by explicitly checking ↵Craig Topper2014-11-011-3/+3
| | | | | | for 0 before calling __builtin_ctz. Without this the optimizers may take advantage of the undefined behavior and produce incorrect results. LLVM itself still needs to be taught to merge the zero check into the llvm.cttz with defined zero behavior. llvm-svn: 221065
* Avoid undefined behavior in the x86 lzcnt header file by explicitly checking ↵Craig Topper2014-11-011-3/+3
| | | | | | for 0 before calling __builtin_clz. Without this the optimizers may take advantage of the undefined behavior and produce incorrect results. LLVM itself still needs to be taught to merge the zero check into the llvm.ctlz with defined zero behavior. llvm-svn: 221064
* CodeGen: Declutter the emitVirtualObjectDelete interfaceDavid Majnemer2014-11-014-23/+24
| | | | | | No functionality change intended. llvm-svn: 221043
* CodeGen: Virtual dtor thunks shouldn't have this marked as 'returned'David Majnemer2014-11-013-12/+11
| | | | | | | The ARM ABI virtual destructor thunks cannot be marked as 'returned' because they return undef. llvm-svn: 221042
* clang/lib/CodeGen/TargetInfo.cpp: Fix a couple of warnings. ↵NAKAMURA Takumi2014-11-011-2/+2
| | | | | | [-Winconsistent-missing-override] llvm-svn: 221039
* Fix a bug where -Wuninitialized would skip arguments to a function call.Richard Trieu2014-11-011-0/+2
| | | | llvm-svn: 221030
* Silence a warning from MSVC "14" by making an enum unsignedReid Kleckner2014-10-312-3/+3
| | | | | | | | | | It says there is a narrowing conversion when we assign it to an unsigned 3 bit bitfield. Also, use unsigned instead of size_t for the Size field of the struct in question. Otherwise they won't run together in MSVC or clang-cl. llvm-svn: 221019
* Implement IRGen for the x86 vectorcall conventionReid Kleckner2014-10-315-50/+176
| | | | | | | | | | | | | | | The most complex aspect of the convention is the handling of homogeneous vector and floating point aggregates. Reuse the homogeneous aggregate classification code that we use on PPC64 and ARM for this. This convention also has a C mangling, and we apparently implement that in both Clang and LLVM. Reviewed By: majnemer Differential Revision: http://reviews.llvm.org/D6063 llvm-svn: 221006
* Objective-C SDK modernization tool. Use its own optionFariborz Jahanian2014-10-312-1/+3
| | | | | | | | ,-objcmt-migrate-property-dot-syntax, when migarting to use property-dot syntax in place of messaging expression. rdar://18839124 llvm-svn: 221001
* Have -Wuninitialized catch uninitalized use in overloaded operator arguments.Richard Trieu2014-10-312-4/+18
| | | | llvm-svn: 221000
* MS ABI: Properly call global delete when invoking virtual destructorsDavid Majnemer2014-10-318-114/+175
| | | | | | | | | | | | | | | | | | | | Summary: The Itanium ABI approach of using offset-to-top isn't possible with the MS ABI, it doesn't have that kind of information lying around. Instead, we do the following: - Call the virtual deleting destructor with the "don't delete the object flag" set. The virtual deleting destructor will return a pointer to 'this' adjusted to the most derived class. - Call the global delete using the adjusted 'this' pointer. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5996 llvm-svn: 220993
* C++-11 [qoi]. Do not warn on missing 'verride' on use ofFariborz Jahanian2014-10-311-0/+6
| | | | | | | macros in user code when macros themselves are defined in a system header. rdar://18295240 llvm-svn: 220992
* [PowerPC] Initial VSX intrinsic support, with min/max for vector doubleBill Schmidt2014-10-313-6/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have initial support for VSX, we can begin adding intrinsics for programmer access to VSX instructions. This patch performs the necessary enablement in the front end, and tests it by implementing intrinsics for minimum and maximum using the vector double data type. The main change in the front end is to no longer disallow "vector" and "double" in the same declaration (lib/Sema/DeclSpec.cpp), but "vector" and "long double" must still be disallowed. The new intrinsics are accessed via vec_max and vec_min with changes in lib/Headers/altivec.h. Note that for v4f32, we already access corresponding VMX builtins, but with VSX enabled we should use the forms that allow all 64 vector registers. The new built-ins are defined in include/clang/Basic/BuiltinsPPC.def. I've added a new test in test/CodeGen/builtins-ppc-vsx.c that is similar to, but much smaller than, builtins-ppc-altivec.c. This allows us to test VSX IR generation without duplicating CHECK lines for the existing bazillion Altivec tests. Since vector double is now legal when VSX is available, I've modified the error message, and changed where we test for it and for vector long double, since the target machine isn't visible in the old place. This serendipitously removed a not-pertinent warning about 'long' being deprecated when used with 'vector', when "vector long double" is encountered and we just want to issue an error. The existing tests test/Parser/altivec.c and test/Parser/cxx-altivec.cpp have been updated accordingly, and I've added test/Parser/vsx.c to verify that "vector double" is now legitimate with VSX enabled. There is a companion patch for LLVM. llvm-svn: 220989
* ignore -mconstructor-aliases when adding field paddings for asanKostya Serebryany2014-10-311-0/+5
| | | | | | | | | | | | | | | | | | Summary: When we are adding field paddings for asan even an empty dtor has to remain in the code, so we ignore -mconstructor-aliases if the paddings are going to be added. Test Plan: added a test Reviewers: rsmith, rnk, rafael Reviewed By: rafael Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6038 llvm-svn: 220986
* clang-format: [Java] Improve line breaks around annotations.Daniel Jasper2014-10-313-6/+20
| | | | | | | | | | | | | | | | | Before: @SomeAnnotation("With some really looooooooooooooong text") private static final long something = 0L; void SomeFunction(@Nullable String something) {} After: @SomeAnnotation("With some really looooooooooooooong text") private static final long something = 0L; void SomeFunction(@Nullable String something) {} llvm-svn: 220984
* clang-format: [js] Updates to Google's JavaScript style.Daniel Jasper2014-10-312-1/+2
| | | | | | The style guide is changing.. llvm-svn: 220977
* Fix the buildDavid Blaikie2014-10-311-1/+1
| | | | llvm-svn: 220974
* Fix ARM HVA classification of classes with non-virtual basesReid Kleckner2014-10-313-148/+162
| | | | | | | | | | | | | | | | Reuse the PPC64 HVA detection algorithm for ARM and AArch64. This is a nice code deduplication, since they are roughly identical. A few virtual method extension points are needed to understand how big an HVA can be and what element types it can have for a given architecture. Also make the record expansion code work in the presence of non-virtual bases. Reviewed By: uweigand, asl Differential Revision: http://reviews.llvm.org/D6045 llvm-svn: 220972
* Fix unused-function warning differently from r220853David Blaikie2014-10-311-8/+1
| | | | | | | | | | Rather than executing this code only needed for an assertion even in a non-asserts build, just roll the function into the assert. The assertion text literally describes the two cases so it doesn't seem like this benefits much from having a separate function (& have to hassle about ifndef NDEBUG it out, etc) llvm-svn: 220970
* [libclang] Disable spell-checking and warnings during code-completion since ↵Argyrios Kyrtzidis2014-10-311-0/+4
| | | | | | they are not needed. llvm-svn: 220966
* Remove StorageClass typedefs from VarDecl and FunctionDecl since ↵Craig Topper2014-10-312-15/+12
| | | | | | StorageClass is in the clang namespace. llvm-svn: 220956
* Remove CastKind typedef from CastExpr since CastKind is in the clang namespace.Craig Topper2014-10-312-3/+3
| | | | llvm-svn: 220955
* Remove a couple typedefs for things in the clang namespace with the same ↵Craig Topper2014-10-312-6/+6
| | | | | | name. Remove a typedef that matches an identical one in the clang namespace. llvm-svn: 220954
* [modules] When a .pcm file is explicitly built separately from the translationRichard Smith2014-10-313-22/+51
| | | | | | unit, allow the -O settings of the two compilations to differ. llvm-svn: 220943
* Make QualType::dump() produce a useful dump of the structure of the type,Richard Smith2014-10-312-17/+247
| | | | | | rather than simply pretty-printing it. llvm-svn: 220942
* ASTDumper.cpp: Appease g++, for now.NAKAMURA Takumi2014-10-311-4/+4
| | | | llvm-svn: 220940
* Rename 'DarwinStaticLib' to 'DarwinLibName'Kuba Brecka2014-10-312-3/+3
| | | | | | | | | | The former name doesn't make sense, we are using this parameter for both .a and .dylib libraries. No functional change. http://reviews.llvm.org/D6040 llvm-svn: 220939
* Refactor tree printing in AST dumping.Richard Smith2014-10-301-541/+345
| | | | | | | | | | | Instead of manually maintaining a flag indicating whether we're about to print out the last child of the parent node (to determine whether we print "`" or "|"), capture a callable to print that child and defer printing it until we either see a next child or finish the parent. No functionality change intended. llvm-svn: 220930
* Get rid of SanitizerOptions::Disabled global. NFC.Alexey Samsonov2014-10-308-54/+58
| | | | | | | | | SanitizerOptions is not even a POD now, so having global variable of this type, is not nice. Instead, provide a regular constructor and clear() method, and let each CodeGenFunction has its own copy of SanitizerOptions it uses. llvm-svn: 220920
* Remove the last couple uses of the ExprArg(just Expr*) typedef in Parser.Craig Topper2014-10-302-2/+2
| | | | llvm-svn: 220897
* [CMake] Prune redundant libdeps.NAKAMURA Takumi2014-10-302-3/+0
| | | | llvm-svn: 220893
* [CMake] Add dependencies on clangToolingCore.NAKAMURA Takumi2014-10-301-0/+1
| | | | llvm-svn: 220890
* [CMake] clangToolingCore requires clangLex.NAKAMURA Takumi2014-10-301-0/+1
| | | | llvm-svn: 220889
* clang-format: Format line if invoked on the trailing newline.Daniel Jasper2014-10-291-2/+1
| | | | llvm-svn: 220883
* Sink a #include while we're here. NFC.Hans Wennborg2014-10-291-0/+1
| | | | | | Format.h doesn't use stack. llvm-svn: 220879
* Trim some includes. NFC.Hans Wennborg2014-10-291-2/+1
| | | | llvm-svn: 220877
* Follow-up to r216619: use isCXXCLassMember() instead of trying toHans Wennborg2014-10-291-1/+1
| | | | | | | check the context ourselves when selectively allowing late-added dll attributes on unused free functions and variables (PR20746) llvm-svn: 220874
* Refactor libTooling to reduce required dependencies.Daniel Jasper2014-10-297-262/+317
| | | | | | | | | | This moves classes for storing and applying replacements to separate files. These classes specifically are used by clang-format which doesn't have any other dependencies on clangAST. Thereby, the size of clang-format's binary can be cut roughly in half and its build time sped up. llvm-svn: 220867
OpenPOWER on IntegriCloud