summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* AArch64: initial NEON supportTim Northover2013-08-017-11/+450
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Ana Pazos - Completed implementation of instruction formats: AdvSIMD three same AdvSIMD modified immediate AdvSIMD scalar pairwise - Completed implementation of instruction classes (some of the instructions in these classes belong to yet unfinished instruction formats): Vector Arithmetic Vector Immediate Vector Pairwise Arithmetic - Initial implementation of instruction formats: AdvSIMD scalar two-reg misc AdvSIMD scalar three same - Intial implementation of instruction class: Scalar Arithmetic - Initial clang changes to support arm v8 intrinsics. Note: no clang changes for scalar intrinsics function name mangling yet. - Comprehensive test cases for added instructions To verify auto codegen, encoding, decoding, diagnosis, intrinsics. llvm-svn: 187568
* Check dynamic_cast is not used with -fno-rtti, unless it is a noop or can be ↵Arnaud A. de Grandmaison2013-08-011-0/+7
| | | | | | resolved statically. llvm-svn: 187564
* Remove more odd code that tries to account for an off by 1 problem in vec3 ↵Craig Topper2013-08-011-8/+0
| | | | | | shuffles that doesn't really exist. llvm-svn: 187561
* Fix to handle all non-power-of-2 vector sizes in the mask form of ↵Craig Topper2013-08-011-10/+2
| | | | | | | | _builtin_shuffle_vector. Previously a 2-bit mask was used to mask each element of a vec6 mask before doing the extracts instead of 3-bit mask necessary to cover 0-5. vec3 was the only non-power-of-2 that worked correctly because a +1 conditionally added before calculating floor(log2(elements)). llvm-svn: 187560
* Sema: Diagnose explicitly bound unresolved member expressions decaying into ↵David Majnemer2013-08-011-25/+42
| | | | | | | | | | | | | pointers to function type We would disallow the case where the overloaded member expression is coming from an address-of operator but we wouldn't issue any diagnostics when the overloaded member expression comes by way of a function to pointer decay cast. Clang's implementation of DR61 is now seemingly complete. llvm-svn: 187559
* Remove broken and unnecessary vec3 handling from VisitShuffleVectorExpr.Craig Topper2013-08-011-5/+1
| | | | llvm-svn: 187558
* Parse: Don't consider attributes of broken member declaratorsDavid Majnemer2013-08-011-31/+32
| | | | | | | | | | | | | | ParseCXXClassMemberDeclaration was trying to use the result of ActOnCXXMemberDeclarator to attach it to some late parsed attributes. However when failures arise, we have no decl to attach to which eventually leads us to a NULL pointer dereference. While we are here, clean up the code a bit. Fixes PR16765 llvm-svn: 187557
* Fix assert when instantiating a default argument of a template defined in aRichard Smith2013-08-011-1/+4
| | | | | | module. llvm-svn: 187556
* Remove the SUPPORT_ALIASARGS defineHans Wennborg2013-08-012-4/+0
| | | | | | It is not needed after LLVM r187546. llvm-svn: 187550
* clang-format: Make alignment of trailing comments optional ..Daniel Jasper2013-07-312-3/+7
| | | | | | .. in order to support WebKit style properly. llvm-svn: 187549
* Make -m[no-]pascal-strings an alias of -f[no]pascal-strings in the .td fileHans Wennborg2013-07-311-8/+1
| | | | | | | | This way we don't have to translate it manually in Clang::ConstructJob. Differential Revision: http://llvm-reviews.chandlerc.com/D1249 llvm-svn: 187547
* ObjectiveC ARC: finishing off issuing error whenFariborz Jahanian2013-07-312-6/+20
| | | | | | | retainable pointer is passed to an audited CF function expecting CF type. // rdar://14569171 llvm-svn: 187543
* clang-format: Add more options to namespace indentation.Daniel Jasper2013-07-313-9/+29
| | | | | | | | | | | | | With this patch, clang-format can be configured to: * not indent in namespace at all (former behavior). * indent in namespace as in other blocks. * indent only in inner namespaces (as required by WebKit style). Also fix alignment of access specifiers in WebKit style. Patch started by Marek Kurdej. Thank you! llvm-svn: 187540
* Option parsing tables: pick up AliasArgs from the OPTION macro.Hans Wennborg2013-07-312-4/+8
| | | | | | | | | This depends on LLVM r187537. The SUPPORT_ALIASARGS macro will be removed once all option parsing clients have been updated. llvm-svn: 187538
* ObjectiveC ARC: Do not issue bridge cast diagnostic whenFariborz Jahanian2013-07-313-6/+16
| | | | | | | | passing a retainable object arg to a CF audited function expecting a CF object type. Issue a normal type mismatch diagnostic. This is wip // rdar://14569171 llvm-svn: 187532
* Fix declaring class template methods with an attributed typedefReid Kleckner2013-07-312-52/+41
| | | | | | | | | | | | | | This change unifies the logic for template instantiation of methods and functions declared with typedefs. It ensures that SubstFunctionType() always fills the Params out param with non-null ParmVarDecls or returns null. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1135 llvm-svn: 187528
* clang-cl: add the /c, /W0 and /W1 optionsHans Wennborg2013-07-311-3/+3
| | | | | | | | | | This adds a few more clang-cl options. It also exposes two core clang options to the clang-cl mode: we need to be able to claim --driver_mode so it doesn't show up as unused in cl mode, and we need -### for tests. Differential Revision: http://llvm-reviews.chandlerc.com/D1232 llvm-svn: 187527
* A few small cleanups to r187504. Thanks to dblaikie for the assist.Kaelyn Uhrain2013-07-311-8/+7
| | | | llvm-svn: 187521
* ObjectiveC arc: minor refactoring in my last patchFariborz Jahanian2013-07-311-2/+5
| | | | | | to avoid future false positives. // rdar://14569171 llvm-svn: 187509
* ObjectiveC arc: Introduce a new initialization kindFariborz Jahanian2013-07-312-9/+25
| | | | | | | | for parameters passed to CF audited functions to be used for better diagnostics. Current set but unused. // rdar://14569171 llvm-svn: 187508
* Improve the diagnostic experience, including adding recovery, forKaelyn Uhrain2013-07-313-8/+44
| | | | | | changing '->' to '.' when there is no operator-> defined for a class. llvm-svn: 187504
* ObjectiveC arc: Move check for type conversions in arcFariborz Jahanian2013-07-313-11/+21
| | | | | | | | out of ImpCastExprToType and to the caller site as appropriate. This is in prep. to do more work for // rdar://14569171 llvm-svn: 187503
* Fix a comment.Hans Wennborg2013-07-311-1/+1
| | | | llvm-svn: 187502
* Fix a crasher than manifests when typo correction suggests a function template.Richard Trieu2013-07-311-2/+2
| | | | llvm-svn: 187467
* Find a better compromise with the default library search paths used byChandler Carruth2013-07-311-20/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | Clang when linking and using a GCC installation from a GCC cross-compiler. This was desired already by two special case platforms (Android and Mips), and turns out to be generally (if frustratingly) true. I've added a substantial comment to the code clarifying the underlying assumptions of doing actual cross compiles with Clang (or GCC for that matter!) and help avoid further confusion here. The end result is to realize that fully general form of PR12478 cannot be resolved while we support existing cross-compiling GCC toolchains, and linking with them (namely, linking against their libgcc and libstdc++ installs). GCC installs these target libraries under a target-specific prefix but one that may not be available within the actual sysroot in use. When linking in this world, GCC works and Clang should as well, but caveat emptor: DSOs from this tree must be replicated and rpath-fixed to be found at runtime within the sysroot. I've extended the cross compile test cases to cover these issues by pointing them at a sysroot and actually checking the library search paths. llvm-svn: 187466
* Fix read of uninitialized enum value in test, caught by UBSan. No functionalityRichard Smith2013-07-312-1/+3
| | | | | | change, other than removal of undefined behavior. llvm-svn: 187465
* clang-format: Improve detection of templates.Daniel Jasper2013-07-301-1/+1
| | | | | | | | | | | Before: template <typename... Types> typename enable_if < 0<sizeof...(Types)>::type Foo() {} After: template <typename... Types> typename enable_if<0 < sizeof...(Types)>::type Foo() {} llvm-svn: 187458
* Start keeping track of what work was done to detect a GCC installationChandler Carruth2013-07-303-1/+29
| | | | | | | | | | | | on the system, and report it when running the driver in verbose mode. Without this it is essentially impossible to understand why a particular GCC toolchain is used by Clang for libstdc++, libgcc, etc. This also required threading a hook through the toolchain layers for a specific toolchain implementation to print custom information under 'clang -v'. The naming here isn't spectacular. Suggestions welcome. llvm-svn: 187427
* err_attribute_missing_parameter_name has been replaced by ↵Aaron Ballman2013-07-301-1/+2
| | | | | | err_attribute_argument_type. llvm-svn: 187420
* Replacing err_attribute_argument_not_int with err_attribute_not_type_attrAaron Ballman2013-07-303-27/+36
| | | | llvm-svn: 187419
* Add MicrosoftVFTableContext to ASTTimur Iskhodzhanov2013-07-305-41/+956
| | | | llvm-svn: 187409
* err_attribute_not_string has been subsumed by err_attribute_argument_type.Aaron Ballman2013-07-302-43/+37
| | | | llvm-svn: 187400
* Refactor some attributes to use checkFunctionOrMethodArgumentIndex instead ↵Aaron Ballman2013-07-301-159/+46
| | | | | | of using custom logic. No functional changes intended. llvm-svn: 187398
* Simplified SourceManager::translateLineCol a bit.Alexander Kornienko2013-07-291-6/+3
| | | | | | | | | | | | Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1183 llvm-svn: 187386
* Update for llvm api change.Rafael Espindola2013-07-292-10/+13
| | | | llvm-svn: 187379
* PR16715: Fix assert in verifier: only mark call to 'operator new' as ↵Richard Smith2013-07-291-2/+5
| | | | | | | | 'builtin' if corresponding 'operator new' was actually emitted as a function marked 'nobuiltin'. llvm-svn: 187374
* Convert a use of status with llvm::sys::fs::getUniqueID.Rafael Espindola2013-07-291-17/+16
| | | | llvm-svn: 187367
* Support for Thread Safety Analysis in CDavid Blaikie2013-07-292-1/+2
| | | | | | Patch by Ethan Jackson. llvm-svn: 187365
* Convert a use of stat with sys::fs::status.Rafael Espindola2013-07-292-12/+13
| | | | llvm-svn: 187364
* Fix handling of "clang c:foo"Rafael Espindola2013-07-291-0/+10
| | | | | | | | | | | | | On windows, c:foo is a valid file path, but stat fails on just "c:". This causes a problem for clang since its file manager wants to cache data about the parent directory. There are refactorings to be done in here, but this gives clang the correct behavior and testing first. Patch by Yunzhong Gao! llvm-svn: 187359
* Return ExprError if both arguments to the mask form of ↵Craig Topper2013-07-291-13/+13
| | | | | | | | __builtin_shufflvector don't have the same number of elements or the mask isn't an integer vector. Previously a diagnostic was issued, but the code went ahead and built the ShuffleVectorExpr. While I'm here also simplify a couple lines by wrapping the return ExprError around the Diag calls. llvm-svn: 187344
* Fix up formatting. No functional change.Craig Topper2013-07-281-6/+6
| | | | llvm-svn: 187334
* Avoid crashing if a directory has no pch files.Rafael Espindola2013-07-281-0/+2
| | | | | | Should fix some of the bots that have assertions disabled. llvm-svn: 187329
* Reduce stack frame size by avoiding a large token vector on an error path.Bob Wilson2013-07-271-1/+1
| | | | | | | | | | | | | | | | | Beginning with svn r186971, we noticed an internal test started to fail when using clang built with LTO. After much investigation, it turns out that there are no blatant bugs here, we are just running out of stack space and crashing. Preprocessor::ReadFunctionLikeMacroArgs already has one vector of 64 Tokens, and r186971 added another. When built with LTO, that function is inlined into Preprocessor::HandleMacroExpandedIdentifier, which for our internal test is invoked in a deep recursive cycle. I'm leaving the original 64 Token vector alone on the assumption that it is important for performance, but the new FixedArgTokens vector is only used on an error path, so it should be OK if it requires additional heap storage. It would be even better if we could avoid the deep recursion, but I think this change is a good thing to do regardless. <rdar://problem/14540345> llvm-svn: 187315
* Fix formatting. No functional change.Craig Topper2013-07-271-1/+1
| | | | llvm-svn: 187294
* Using the function pointer instead of the function type; this allows us to ↵Aaron Ballman2013-07-271-1/+1
| | | | | | re-enable a warning in MSVC by default. llvm-svn: 187292
* clang-cl: add support for the /? and /help optionsHans Wennborg2013-07-271-4/+36
| | | | | | | | | | | | | | This establishes a new Flag in Options.td, which can be assigned to options that should be made available in clang's cl.exe compatible mode, and updates the Driver to make use of the flag. (The whitespace change to CMakeLists forces the build to re-run CMake and pick up the include dependency on the new .td file. This makes the build work if someone moves backwards in commit history after this change.) Differential Revision: http://llvm-reviews.chandlerc.com/D1215 llvm-svn: 187280
* Don't build expressions for invalid casts.Eli Friedman2013-07-261-8/+21
| | | | | | | | | | This matches how we normally perform semantic analysis for other sorts of invalid expressions: it means we don't have to reason about invalid sub-expressions. Fixes PR16680. llvm-svn: 187276
* Handle a difference in lambda return type deduction between C++11 and C++1y: ifRichard Smith2013-07-261-2/+8
| | | | | | | no return type is specified, C++11 will deduce a cv-qualified return type in some cases, but C++1y never will. llvm-svn: 187275
* PR16708: If a lambda has an implicit return type, don't get confused if its ↵Richard Smith2013-07-261-17/+17
| | | | | | return type has already been determined to be a type containing an 'auto'. llvm-svn: 187266
OpenPOWER on IntegriCloud