summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Move the no-prototype calling conv check after decl mergingReid Kleckner2014-11-031-13/+14
| | | | | | | | | | | Now we don't warn on this code: void __stdcall f(void); void __stdcall f(); My previous commit regressed this functionality because I didn't update the relevant test case which used a definition. llvm-svn: 221188
* Don't diagnose no-prototype callee-cleanup function definitionsReid Kleckner2014-11-031-15/+15
| | | | | | | | | | | | We already have a warning on the call sites of code like this: void f() { } void g() { f(1, 2, 3); } t.c:2:21: warning: too many arguments in call to 'f' We can limit ourselves to diagnosing unprototyped forward declarations of f to cut down on noise. llvm-svn: 221184
* Further restrict issuance of 'override' warning if methodFariborz Jahanian2014-11-031-5/+7
| | | | | | is argument to a macro which is defined in system header. llvm-svn: 221172
* Implement vaarg lowering for ppc32. Lowering of scalars and aggregatesRoman Divacky2014-11-031-3/+101
| | | | | | is supported. Complex numbers are not. llvm-svn: 221170
* This patch reverts r220496 which issues warning on comparing Fariborz Jahanian2014-11-031-31/+1
| | | | | | | | parameters with nonnull attribute when comparison is always true/false. Patch causes false positive when parameter is modified in the function. llvm-svn: 221163
* Emit OpenCL local global variables without zeorinitializerMatt Arsenault2014-11-031-1/+9
| | | | | | | | Local variables are not initialized, and every target has been (incorrectly) ignoring the unnecessary request for zero initialization. llvm-svn: 221162
* Don't allow dllimport/export on classes with internal linkage (PR21399)Hans Wennborg2014-11-031-0/+6
| | | | | | | | | | | Trying to import or export such classes doesn't make sense, and Clang would assert trying to export vtables for them. This is consistent with how we treat functions with internal linkage, but it is stricter than MSVC so we may have to back down if it breaks real code. llvm-svn: 221160
* Revert "clang-format: [Java] Allow trailing semicolons after enums."Daniel Jasper2014-11-031-3/+4
| | | | | | | | | This reverts commit b5bdb2ef59ab922bcb4d6e843fffaee1f7f68a8c. This doesn't really seem necessary on second though and causes problems with C++ enum formatting. llvm-svn: 221158
* Don't dllimport inline functions when targeting MinGW (PR21366)Hans Wennborg2014-11-034-9/+44
| | | | | | | | | | | | It turns out that MinGW never dllimports of exports inline functions. This means that code compiled with Clang would fail to link with MinGW-compiled libraries since we might try to import functions that are not imported. To fix this, make Clang never dllimport inline functions when targeting MinGW. llvm-svn: 221154
* [x86] Add cx16 feature to KNL, SKX, and CoreAVXi CPUs.Craig Topper2014-11-031-2/+5
| | | | llvm-svn: 221132
* [x86] Realphabetize the feature string decoding function since it was mostly ↵Craig Topper2014-11-031-4/+4
| | | | | | in alphabetical order. llvm-svn: 221131
* Add FSGSBASE intrinsics to x86 intrinsic headers.Craig Topper2014-11-033-15/+76
| | | | llvm-svn: 221130
* Remove definitions from Intrin.h that already exist in one of the other x86 ↵Craig Topper2014-11-031-52/+0
| | | | | | intrinsic headers. Add a run line with Broadwell as the cpu type to ms-intrin.cpp test to catch some of these in the future. llvm-svn: 221127
* clang-format: [Java] Allow trailing semicolons after enums.Daniel Jasper2014-11-031-4/+3
| | | | | | | | | | | Before: enum SomeThing { ABC, CDE } ; After: enum SomeThing { ABC, CDE }; llvm-svn: 221125
* 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
OpenPOWER on IntegriCloud