summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [CodeGen][ARM] Make sure the value and type used to create a bitcastAkira Hatanaka2016-12-011-10/+20
| | | | | | | | | | | have the same size. This fixes an asset that is triggered when an address of a boolean variable is passed to __builtin_arm_ldrex or __builtin_arm_strex. rdar://problem/29269006 llvm-svn: 288404
* [clang] Implement support for -defsym assembler optionMandeep Singh Grang2016-12-011-0/+3
| | | | | | | | | | | | | | | | | Summary: Adds support for -Wa,-defsym,abc=1 option. Related llvm patch: https://reviews.llvm.org/D26214 Reviewers: rafael, t.p.northover, colinl, echristo, compnerd, rengolin Subscribers: mehdi_amini Tags: #clang-c Differential Revision: https://reviews.llvm.org/D26213 llvm-svn: 288397
* swiftcc: Add an api to query whether a target ABI stores swifterror in a ↵Arnold Schwaighofer2016-12-013-0/+28
| | | | | | register llvm-svn: 288394
* Adds hasUnqualifiedDesugaredType to allow matching through type sugar.Manuel Klimek2016-12-011-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D27207 llvm-svn: 288366
* [ObjC] Avoid a @try/@finally/@autoreleasepool fixit when parsing an expressionAlex Lorenz2016-12-011-1/+6
| | | | | | | | | | | | This patch ensures that the typo fixit for the @try/@finally/@autoreleasepool {} directive is shown only when we're parsing an actual statement where such directives can actually be present. rdar://19669565 Differential Revision: https://reviews.llvm.org/D26916 llvm-svn: 288334
* [OpenCL] Refactor read_only/write_only pipes.Joey Gouly2016-12-013-62/+21
| | | | | | | | | | | This adds the access qualifier to the Pipe Type, rather than using a class hierarchy. It also fixes mergeTypes for Pipes, by disallowing merges. Only identical pipe types can be merged. The test case in invalid-pipes-cl2.0.cl is added to check that. llvm-svn: 288332
* Fix crash with unsupported architectures in Linux/Gnu target triples.Florian Hahn2016-12-011-3/+8
| | | | | | | | | | | | Summary: This patch adds a check and an error message to gnutools::Linker::ConstructJob in case the architecture is not supported. For most other operating systems, the error message is created in lib/Basic/Targets.cpp:AllocateTarget, but when construction the linker arguments for the gnutools linker a supported architecture is required. Reviewers: rafael, joerg, echristo Subscribers: mehdi_amini, joerg, dschuff, cfe-commits Differential Revision: https://reviews.llvm.org/D27066 llvm-svn: 288327
* Teach ConstantBuilder how to emit a reference to the current positionJohn McCall2016-12-011-0/+40
| | | | | | that will be filled in when the initializer is set. llvm-svn: 288313
* P0012R1: add Itanium ABI support for throwing non-noexcept function pointers ↵Richard Smith2016-12-011-41/+42
| | | | | | and catching as noexcept. llvm-svn: 288305
* Revert r285664, cxx-abi-dev chose to go in a different direction for the ABI ↵Richard Smith2016-12-012-110/+4
| | | | | | here. llvm-svn: 288304
* PR31081: ignore exception specifications when deducing function templateRichard Smith2016-12-014-43/+89
| | | | | | | arguments from a declaration; despite what the standard says, this form of deduction should not be considering exception specifications. llvm-svn: 288301
* Clean up CGObjCMac's APIs for deriving class references. NFC.John McCall2016-11-303-115/+89
| | | | llvm-svn: 288295
* [OpenMP] Sema and parsing for 'teams distribute parallel for simd' pragmaKelvin Li2016-11-3013-15/+217
| | | | | | | | This patch is to implement sema and parsing for 'teams distribute parallel for simd' pragma. Differential Revision: https://reviews.llvm.org/D27084 llvm-svn: 288294
* Introduce a type-safe enum for ForDefinition.John McCall2016-11-304-18/+30
| | | | llvm-svn: 288289
* Fix some layering violations where CGObjCMac's NSString emission wasJohn McCall2016-11-303-135/+127
| | | | | | | | | | performed at the CodeGenModule level. Would be NFC except we now also use a different uniquing structure so that we don't get spurious conflicts if you ask for both an NSString and a CFString for the same content (which is possible with builtins). llvm-svn: 288287
* Prospective MSVC workaround.John McCall2016-11-301-1/+2
| | | | llvm-svn: 288272
* Finish adopting ConstantInitBuilder in CGObjCGNU. NFC.John McCall2016-11-302-180/+187
| | | | llvm-svn: 288269
* [Sema] Teach -Wcast-align to look at the aligned attribute of theAkira Hatanaka2016-11-301-0/+22
| | | | | | | | | | | | | declared variables. Teach Sema to check the aligned attribute attached to variable declarations so that it doesn't issue spurious warnings. rdar://problem/26517471 Differential revision: https://reviews.llvm.org/D21099 llvm-svn: 288267
* [analyzer] Construct temporary objects of correct types, destroy them properly.Artem Dergachev2016-11-301-30/+49
| | | | | | | | | | | | | | | | | | | | | | | When constructing a temporary object region, which represents the result of MaterializeTemporaryExpr, track down the sub-expression for which the temporary is necessary with a trick similar to the approach used in CodeGen, namely by using Expr::skipRValueSubobjectAdjustments(). Then, create the temporary object region with type of that sub-expression. That type would propagate further in a path-sensitive manner. During destruction of lifetime-extened temporaries, consult the type of the temporary object region, rather than the type of the lifetime-extending variable, in order to call the correct destructor (fixes pr17001) and, at least, not to crash by trying to call a destructor of a plain type (fixes pr19539). rdar://problem/29131302 rdar://problem/29131576 Differential Revision: https://reviews.llvm.org/D26839 llvm-svn: 288263
* [analyzer] Minor fixes and improvements to debug.ExprInspectionArtem Dergachev2016-11-301-14/+91
| | | | | | | | | | | | | | | | | | - Fix the bug with transition handling in ExprInspectionChecker's checkDeadSymbols implementation. - Test this bug by adding a new function clang_analyzer_numTimesReached() to catch number of passes through the code, which should be handy for testing against unintended state splits. - Add two more functions should help debugging issues quickly without running the debugger or dumping exploded graphs - clang_analyzer_dump() which dump()s an SVal argument to a warning message, and clang_analyzer_printState(), which dump()s the current program state to stderr. Differential Revision: https://reviews.llvm.org/D26835 llvm-svn: 288257
* Prospective GCC build fix: the unelaborated form of this friendJohn McCall2016-11-301-2/+2
| | | | | | | declaration should find the right type, assuming it's supported evenly across all our hosts. llvm-svn: 288231
* Switch CGObjCMac to use ConstantInitBuilder. Whew.John McCall2016-11-302-778/+862
| | | | | | | Not strictly NFC because I did change the order of emission of some global constants, but it shouldn't make any difference. llvm-svn: 288229
* Fix -Winconsistent-missing-override in CodeGenAction.cppReid Kleckner2016-11-301-1/+1
| | | | llvm-svn: 288227
* Fix formatting issue from r288207Hans Wennborg2016-11-301-1/+1
| | | | llvm-svn: 288223
* Stop handling interesting deserialized decls after HandleTranslationUnitReid Kleckner2016-11-301-0/+13
| | | | | | | | Other AST consumers can deserialize interesting decls that we might codegen, but they won't make it to the final object file and can trigger assertions in debug information generation after finalization. llvm-svn: 288221
* [c++1z] Improve support for -fno-exceptions: we can't just ignore exceptionRichard Smith2016-11-302-41/+55
| | | | | | | | | specifications in this mode in C++17, since they're part of the function type, so check and diagnose them like we would if exceptions were enabled. Better ideas welcome. llvm-svn: 288220
* [c++1z] PR31210: ignore exception specification when matching the type of aRichard Smith2016-11-291-3/+19
| | | | | | builtin with the type of an explicit declaration of the same function. llvm-svn: 288208
* Don't try to merge DLL attributes on redeclaration of invalid decl (PR31069)Hans Wennborg2016-11-291-0/+3
| | | | llvm-svn: 288207
* getObjCEncodingForMethodDecl cannot fail. Simplify. NFC.John McCall2016-11-295-68/+45
| | | | llvm-svn: 288203
* Support constant expression evaluation for wchar_t versions of simple stringRichard Smith2016-11-292-30/+76
| | | | | | functions, in order to support constexpr std::char_traits<wchar_t>. llvm-svn: 288193
* [OpenCL] Prevent generation of globals in non-constant AS for OpenCL.Anastasia Stulova2016-11-291-2/+6
| | | | | | | | | | Avoid using shortcut for const qualified non-constant address space aggregate variables while generating them on the stack such that the alloca object is used instead of a global variable containing initializer. Review: https://reviews.llvm.org/D27109 llvm-svn: 288163
* [OpenCL] Prohibit using reserve_id_t in program scope.Alexey Bader2016-11-291-50/+55
| | | | | | | | | | | | Patch by Egor Churaev (echuraev). Reviewers: Anastasia Subscribers: cfe-commits, yaxunl, bader Differential Revision: https://reviews.llvm.org/D27099 llvm-svn: 288126
* Removed DEBUG_TYPE from TokenAnalyzer.hKrasimir Georgiev2016-11-291-2/+0
| | | | | | | | | | | | | | Summary: Defining DEBUG_TYPE in a header file doesn't make sense. It is already defined in the corresponding source file. Reviewers: klimek, ioeric Subscribers: klimek Differential Revision: https://reviews.llvm.org/D27164 llvm-svn: 288125
* Correct comment: we are creating a canonicla decltypetype.Yaron Keren2016-11-291-1/+1
| | | | llvm-svn: 288124
* clang-format: [JS] Properly format dict literals that skip labels.Daniel Jasper2016-11-291-0/+3
| | | | llvm-svn: 288121
* clang-format: Wrap complex binary expressions on the RHS of a comma.Daniel Jasper2016-11-291-1/+1
| | | | | | | | | Specifically, if the RHS of a comma is a complex binary expression and spans multiple lines, insert a line break before it. This usually is often more readable compared to producing a hanging indent. See changes in FormatTest.cpp for examples. llvm-svn: 288120
* clang-format: Fix unnnecessary line break.Daniel Jasper2016-11-291-1/+2
| | | | | | | | | | | | | | | Before: aaaaaaaaaa(aaaa(aaaa, aaaa), // aaaa, aaaaa); After: aaaaaaaaaa(aaaa(aaaa, aaaa), // aaaa, aaaaa); llvm-svn: 288119
* Add a warning for 'main' returning 'true' or 'false'.Richard Smith2016-11-291-0/+4
| | | | | | Patch by Joshua Hurwitz! llvm-svn: 288097
* Use ${:uid} to generate unique MS asm labels, not {:uid}Reid Kleckner2016-11-291-1/+1
| | | | llvm-svn: 288093
* IRGen: Remove all uses of CreateDefaultAlignedLoad.Peter Collingbourne2016-11-285-33/+37
| | | | | | Differential Revision: https://reviews.llvm.org/D27157 llvm-svn: 288083
* Make CGVTables use ConstantInitBuilder. NFC.John McCall2016-11-284-78/+89
| | | | llvm-svn: 288081
* Hide the result of building a constant initializer. NFC.John McCall2016-11-284-48/+91
| | | | llvm-svn: 288080
* ConstantBuilder -> ConstantInitBuilder for clarity, andJohn McCall2016-11-286-124/+141
| | | | | | | move the member classes up to top level to allow forward declarations to name them. NFC. llvm-svn: 288079
* [Driver] Fix recognizing newer OpenSUSE versionsMichal Gorny2016-11-281-2/+5
| | | | | | | | | | Fix recognizing newer OpenSUSE versions that combine the two version components into 'VERSION = x.y'. The check was written against an older version that kept those two split as VERSION and PATCHLEVEL. Differential Revision: https://reviews.llvm.org/D26850 llvm-svn: 288061
* [Driver] Refactor distro detection & classification as a separate APIMichal Gorny2016-11-283-176/+144
| | | | | | | | | | | | Refactor the Distro enum along with helper functions into a full-fledged Distro class, inspired by llvm::Triple, and make it a public API. The new class wraps the enum with necessary comparison operators, adding the convenience Is*() methods and a constructor performing the detection. The public API is needed to run the unit tests (D25869). Differential Revision: https://reviews.llvm.org/D25949 llvm-svn: 288060
* [MS] Mangle a unique ID into all MS inline asm labelsReid Kleckner2016-11-283-17/+5
| | | | | | | | | | | | This solves PR23715 in a way that is compatible with LTO. MSVC supports jumping to source-level labels and between inline asm blocks, but we don't. Also revert the old solution, r255201, which was to mark these calls as noduplicate. llvm-svn: 288059
* [OPENMP] Fix for PR31137: Wrong DSA for members in struct.Alexey Bataev2016-11-281-1/+2
| | | | | | | | | If member expression is used in the task region and the base expression is a DeclRefExp and the variable used in this ref expression is private, it should be marked as implicitly firstprivate inside this region. Patch fixes this issue. llvm-svn: 288039
* [Sema] Set range end of constructors and destructors in template instantiationsMalcolm Parsons2016-11-281-0/+2
| | | | | | | | | | | | | | | | | | Summary: clang-tidy checks frequently use source ranges of functions. The source range of constructors and destructors in template instantiations is currently a single token. The factory method for constructors and destructors does not allow the end source location to be specified. Set end location manually after creating instantiation. Reviewers: aaron.ballman, rsmith, arphaman Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D26849 llvm-svn: 288025
* Adjust type-trait evaluation to properly handle Using(Shadow)DeclsHal Finkel2016-11-271-4/+10
| | | | | | | | | | | | | | | | Since r274049, for an inheriting constructor declaration, the name of the using declaration (and using shadow declaration comes from the using declaration) is the name of a derived class, not the base class (line 8225-8232 of lib/Sema/SemaDeclCXX.cpp in https://reviews.llvm.org/rL274049). Because of this, name-based lookup performed inside Sema::LookupConstructors returns not only CXXConstructorDecls but also Using(Shadow)Decls, which results assertion failure reported in PR29087. Patch by Taewook Oh, thanks! Differential Revision: https://reviews.llvm.org/D23765 llvm-svn: 287999
* [DOXYGEN] Updated instruction names corresponding to avxintrin.h intrinsics.Ekaterina Romanova2016-11-261-166/+188
| | | | | | | | | Documentation for some of the avxintrin.h's intrinsics errorneously said that non VEX-prefixed instructions could be generated. This was fixed. I tried several different solutions to achieve pretty printing of unordered lists (nested and non-nested) in param sections in doxygen. llvm-svn: 287990
OpenPOWER on IntegriCloud