summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Certain multi-platform languages, such as OpenCL, have the concept ofDavid Tweed2013-09-1312-9/+123
| | | | | | | | | | | | | | address spaces which is both (1) a "semantic" concept and (2) possibly a hardware level restriction. It is desirable to be able to discard/merge the LLVM-level address spaces on arguments for which there is no difference to the current backend while keeping track of the semantic address spaces in a funciton prototype. To do this enable addition of the address space into the name-mangling process. Add some tests to document this behaviour against inadvertent changes. Patch by Michele Scandale! llvm-svn: 190684
* Add "native" to config.available_features, to make it easier to disable ↵Amaury de la Vieuville2013-09-134-1/+8
| | | | | | | | non-x-compile-safe tests Patch by Artyom Skrobov! llvm-svn: 190681
* clang-format: Detect braced lists in subscript expressions.Daniel Jasper2013-09-132-1/+3
| | | | | | | | | | Before (even with Style.Cpp11BracedListStyle): f(MyMap[{ composite, key }]); After: f(MyMap[{composite, key}]); llvm-svn: 190678
* [-cxx-abi microsoft] Mangle user defined entry points properlyDavid Majnemer2013-09-132-2/+45
| | | | | | | | | | | | | | | | Summary: Functions named "main", "wmain", "WinMain", "wWinMain", and "DllMain" are never mangled regardless of linkage, even when compiling for kernel mode. Depends on D1655 Reviewers: timurrrr, pcc, rnk, whunt CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1670 llvm-svn: 190675
* clang-format: Fix incorrect enum parsing / layouting.Daniel Jasper2013-09-137-55/+56
| | | | | | | | | | | | | | | Before: enum { Bar = Foo < int, int > ::value }; After: enum { Bar = Foo<int, int>::value }; llvm-svn: 190674
* [-cxx-abi microsoft] Mangle declarations inside extern "C"David Majnemer2013-09-132-33/+86
| | | | | | | | | | | | | | | Summary: This is a first step to getting extern "C" working properly inside clang. There are a number of quirks but mangling declarations inside such a function are a good first step. Reviewers: timurrrr, pcc, cdavis5x CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1655 llvm-svn: 190671
* CHECK -> CHECK-DAGDavid Majnemer2013-09-131-82/+82
| | | | llvm-svn: 190670
* Refactor the uninitialized field visitor. Also moved the calls to the visitorRichard Trieu2013-09-132-54/+107
| | | | | | | later in the code so that the expressions will have addition processing first. This catches a few additional cases of uninitialized uses of class fields. llvm-svn: 190657
* Documentation: Doxygen-ification of existing docs for Sema/DelayedDiagnostic.h.James Dennett2013-09-131-12/+12
| | | | llvm-svn: 190656
* Documentation cleanup: Fixing \brief comments, migrating away from old styleJames Dennett2013-09-131-26/+26
| | | | | | | that duplicated the name of the entity being documented at the start of its comment, and other minor tidyups. llvm-svn: 190655
* Fix two incorrect comments.Jordan Rose2013-09-132-3/+3
| | | | | | Patch by Jared Grubb! llvm-svn: 190652
* [analyzer] Fix copy-paste error in internal docs.Jordan Rose2013-09-131-1/+1
| | | | | | Patch by Jared Grubb! llvm-svn: 190651
* [analyzer] Run post-stmt checks for DeclStmt.Jordan Rose2013-09-131-1/+4
| | | | | | | | | No tests because no in-tree checkers use this, but that shouldn't stop out-of-tree checkers. Found by Aemon Cannon! llvm-svn: 190650
* Restore the sqrt -> llvm.sqrt mapping in fast-math modeHal Finkel2013-09-122-6/+18
| | | | | | | | | | | | | | | This restores the sqrt -> llvm.sqrt mapping, but only in fast-math mode (specifically, when the UnsafeFPMath or NoNaNsFPMath CodeGen options are enabled). The @llvm.sqrt* intrinsics have slightly different semantics from the libm call, specifically, they are undefined when given a non-zero negative number (the libm calls will always return NaN for any negative number). This mapping was removed in r100613, and replaced with a TODO, but at that time the fast-math flags were not yet implemented. Now that we have these, restoring this mapping is important because it will enable autovectorization of sqrt calls in loops (at least in fast-math mode). llvm-svn: 190646
* Fix typo in llvm_unreachable string.Nick Lewycky2013-09-121-1/+1
| | | | llvm-svn: 190641
* PR13657 (and duplicates):Richard Smith2013-09-1210-95/+843
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a comma occurs in a default argument or default initializer within a class, disambiguate whether it is part of the initializer or whether it ends the initializer. The way this works (which I will be proposing for standardization) is to treat the comma as ending the default argument or default initializer if the following token sequence matches the syntactic constraints of a parameter-declaration-clause or init-declarator-list (respectively). This is both consistent with the disambiguation rules elsewhere (where entities are treated as declarations if they can be), and should have no regressions over our old behavior. I think it might also disambiguate all cases correctly, but I don't have a proof of that. There is an annoyance here: because we're performing a tentative parse in a situation where we may not have seen declarations of all relevant entities (if the comma is part of the initializer, lookup may find entites declared later in the class), we need to turn off typo-correction and diagnostics during the tentative parse, and in the rare case that we decide the comma is part of the initializer, we need to revert all token annotations we performed while disambiguating. Any diagnostics that occur outside of the immediate context of the tentative parse (for instance, if we trigger the implicit instantiation of a class template) are *not* suppressed, mirroring the usual rules for a SFINAE context. llvm-svn: 190639
* Fix regression from r190427.Eli Friedman2013-09-122-1/+6
| | | | | | <rdar://problem/14970968> llvm-svn: 190635
* Add a test case to test RAV visits parameters of implicit copy constructor.Michael Han2013-09-121-3/+7
| | | | llvm-svn: 190632
* PR16054: Slight strengthening for -Wsometimes-uninitialized: if we use aRichard Smith2013-09-125-22/+133
| | | | | | | | | | | variable uninitialized every time we reach its (reachable) declaration, or every time we call the surrounding function, promote the warning from -Wmaybe-uninitialized to -Wsometimes-uninitialized. This is still slightly weaker than desired: we should, in general, warn if a use is uninitialized the first time it is evaluated. llvm-svn: 190623
* Move the execution code from Compilation::ExecuteCommand to Command::ExecuteHans Wennborg2013-09-123-13/+18
| | | | | | | | | | | | | | I think it makes sense that a Command knows how to execute itself. There's no functionality change but i rewrote the code to avoid the manual memory management of Argv. My motivation for this is that I plan to subclass Command to build fall-back functionality into clang-cl. Differential Revision: http://llvm-reviews.chandlerc.com/D1654 llvm-svn: 190621
* Move Compilation::PrintJob and PrintDiagnosticJob into Job::Print.Hans Wennborg2013-09-129-162/+128
| | | | | | | | | | | | | | | | | This moves the code to Job.cpp, which seems like a more natural fit, and replaces the "is this a JobList? is this a Command?" logic with a virtual function call. It also removes the code duplication between PrintJob and PrintDiagnosticJob and simplifies the code a little. There's no functionality change here, except that the Executable is now always printed within quotes, whereas it would previously not be quoted in crash reports, which I think was a bug. Differential Revision: http://llvm-reviews.chandlerc.com/D1653 llvm-svn: 190620
* [CMake] Put controversial always-recheck-revision-number behind an option.Jordan Rose2013-09-122-2/+10
| | | | | | | | | | | | | | | CMake does not have the ability to perform actions before calculating dependencies, so it can't know whether it needs to rebuild clangBasic to update for a new revision number. CLANG_ALWAYS_CHECK_VC_REV (off by default) will cause clangBasic to always be dirty by deleting the generated SVNVersion.inc after use; otherwise, SVNVersion.inc will always be updated, but only included in the final binary when clangBasic is rebuilt. It'd be great to find a better way to do this, but hopefully this is still an improvement over the complete lack of version information before. llvm-svn: 190613
* Fix the MCTargetAsmParser API change.Joey Gouly2013-09-122-4/+4
| | | | llvm-svn: 190601
* [libclang] In clang_getLocation, check that the provided line/column is valid.Argyrios Kyrtzidis2013-09-121-0/+2
| | | | | | rdar://14971432 llvm-svn: 190568
* Fix the end-location of a CXXTemporaryObjectExpr when it is created with a ↵Argyrios Kyrtzidis2013-09-112-1/+48
| | | | | | | | initializer_list. rdar://14887351 llvm-svn: 190561
* [CMake] Fix repository version checking dependencies harder.Jordan Rose2013-09-111-1/+1
| | | | | | Just always regenerate SVNVersion.inc. Don't worry about it not changing. llvm-svn: 190560
* clang/test/FixIt/fixit-unicode-with-utf8-output.c: Remove XFAIL.NAKAMURA Takumi2013-09-111-1/+0
| | | | | | | | It'd be another issue that the terminal and stdout(including redirects) with utf8. This test XPASSed on Win32, at least on Lit. FYI, we don't use a triplet like "-win64" anywhere. llvm-svn: 190559
* [CMake] Always include the Clang repo version, just like the autoconf build.Jordan Rose2013-09-111-30/+20
| | | | | | | | | | | | | Now that LLVM's helper script GetSVN.cmake actually works consistently, there's no reason not to use it. This does mean that the clangBasic target is potentially always dirty, because CMake-generated projects do not necessarily recalculate dependencies after running each target. This should end the issues of the AST format changing and breaking old module files; CMake-Clang should now detect that the version changed just like Autoconf-Clang has. llvm-svn: 190557
* ObjectiveC migration. NS_RETURNS_NOT_RETAINED is the default forFariborz Jahanian2013-09-112-25/+19
| | | | | | | unknown methods which return Cocoa objects. No need to annotate such methods. llvm-svn: 190555
* clang-format: Fix bug in pointer detectionDaniel Jasper2013-09-112-1/+2
| | | | | | | | | Before: for (int i = 0; i* 2 < z; i *= 2) {} After: for (int i = 0; i * 2 < z; i *= 2) {} llvm-svn: 190546
* Tablegen now generates a StringSwitch for attributes containing enumeration ↵Aaron Ballman2013-09-118-89/+66
| | | | | | arguments to map strings to the proper enumeration value. This makes error checking more consistent and reduces the amount of hand-written code required. llvm-svn: 190545
* ObjectiveC migrator. Modify inferred property nameFariborz Jahanian2013-09-113-1/+17
| | | | | | | | such that it does not lower case the staring property name if getter name (after "get" prefix) starts with two upper case letters. llvm-svn: 190539
* Test for correct usage of columnWidth in clang fixit hints.Alexander Kornienko2013-09-112-3/+37
| | | | | | | | | | | | | | | | | Summary: This test only works on systems capable of outputting UTF-8 encoded text on the standard output (tested on linux and OS X, should XFAIL on windows, if I haven't messed up the XFAIL line). Reviewers: jordan_rose Reviewed By: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1607 llvm-svn: 190537
* Clarify the status of PowerPC support.Roman Divacky2013-09-111-2/+10
| | | | llvm-svn: 190533
* ObjectiveC migrator. methods which look like a getter andFariborz Jahanian2013-09-113-10/+32
| | | | | | start with "get" are inferreed as a readonly properties. llvm-svn: 190532
* Added regression tests.Serge Pavlov2013-09-111-0/+13
| | | | llvm-svn: 190531
* [analyzer] Handle zeroing constructors for fields of structs with empty bases.Jordan Rose2013-09-112-4/+37
| | | | | | | | | | | | | | | | | | | RegionStore tries to protect against accidentally initializing the same region twice, but it doesn't take subregions into account very well. If the outer region being initialized is a struct with an empty base class, the offset of the first field in the struct will be 0. When we initialize the base class, we may invalidate the contents of the struct by providing a default value of Unknown (or some new symbol). We then go to initialize the member with a zeroing constructor, only to find that the region at that offset in the struct already has a value. The best we can do here is to invalidate that value and continue; neither the old default value nor the new 0 is correct for the entire struct after the member constructor call. The correct solution for this is to track region extents in the store. <rdar://problem/14914316> llvm-svn: 190530
* clang-cl: Warn about overriding /MD with /MT etc.Hans Wennborg2013-09-115-13/+29
| | | | | | | This also bakes the /M options into a separate option group to make them easier to refer to from the code. llvm-svn: 190529
* Teach RAV to visit parameter variable declarations of implicit functions. ↵Michael Han2013-09-114-2/+43
| | | | | | | | | | | | | | | Fixes PR16182. Normally RAV visits parameter variable declarations of a function by traversing the TypeLoc of the parameter declarations. However, for implicit functions, their parameters don't have any TypeLoc, because they are implicit. So for implicit functions, we visit their parameter variable declarations by traversing them through the function declaration, and visit them accordingly. Reviewed by Richard Smith and Manuel Klimek. llvm-svn: 190528
* fix xcore-opts.c testRobert Lytton2013-09-111-1/+1
| | | | llvm-svn: 190526
* Adding some additional test cases for the cleanup attribute.Aaron Ballman2013-09-111-0/+11
| | | | llvm-svn: 190525
* Fix 2 cases of uninitialized reads of an invalid PresumedLoc.Evgeniy Stepanov2013-09-112-15/+17
| | | | | | | | | The code in CGExpr was added back in 2012 (r165536) but not exercised in tests until recently. Detected on the MemorySanitizer bootstrap bot. llvm-svn: 190521
* Support for CR LF newlines.Alexander Kornienko2013-09-114-36/+78
| | | | | | | | | | | | | | | | | | Summary: reformat() tries to determine the newline style used in the input (either LF or CR LF), and uses it for the output. Maybe not every single case is supported, but at least the bug described in http://llvm.org/PR17182 should be resolved. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1643 llvm-svn: 190519
* Fix the ASan dll_thunk pathTimur Iskhodzhanov2013-09-112-3/+2
| | | | llvm-svn: 190516
* Simplify code with the in place path::native. No functionality change.Benjamin Kramer2013-09-112-7/+4
| | | | llvm-svn: 190515
* Split -Wunused-variable warning.Daniel Jasper2013-09-114-1/+14
| | | | | | | | | | | With r190382, -Wunused-variable warns about unused const variables when appropriate. For codebases that use -Werror, this poses a problem as existing unused const variables need to be cleaned up first. To make the transistion easier, this patch splits -Wunused-variable by pulling out an additional -Wunused-const-variable (by default activated along with -Wunused-variable). llvm-svn: 190508
* [mips][msa] Corrected the definition of the dotp_[su].[hwd] intrinsicsDaniel Sanders2013-09-112-12/+12
| | | | | | | The elements of the operands should be half the width of the elements of the result. llvm-svn: 190505
* SemaTemplateDeduction.cpp: Prune two stray \param(s), TPOC and ↵NAKAMURA Takumi2013-09-111-6/+0
| | | | | | NumCallArguments in Sema::getMostSpecialized(). They were removed since r190444. [-Wdocumentation] llvm-svn: 190501
* Remove unused diagnostics.Benjamin Kramer2013-09-111-4/+0
| | | | llvm-svn: 190500
* Support for modular module-map-filesDaniel Jasper2013-09-118-2/+85
| | | | | | | | | | | | | | | | | | | This patch is the first step to make module-map-files modular (instead of requiring a single "module.map"-file per include directory). This step adds a new "extern module" declaration that enables module-map-files to reference one another along with a very basic implementation. The next steps are: * Combine this with the use-declaration (from http://llvm-reviews.chandlerc.com/D1546) in order to only load module map files required for a specific compilation. * Add an additional flag to start with a specific module-map-file (instead of requiring there to be at least one "module.map"). Review: http://llvm-reviews.chandlerc.com/D1637 llvm-svn: 190497
OpenPOWER on IntegriCloud