summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Fix a bug where -msse followed by -mno-sse would leave MMX enabled.Craig Topper2013-09-112-2/+16
| | | | llvm-svn: 190496
* [-cxx-abi microsoft] Canonicalize array parameters betterDavid Majnemer2013-09-112-27/+57
| | | | | | | | | | | | | | | Summary: More accurately characterize the nature of array parameters. Doing this removes false back-reference opportunities. Remove some hacks now that we characterize these better. Reviewers: rnk, timurrrr, whunt, cdavis5x CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1626 llvm-svn: 190488
* Do not quote YAML plain string myself. Let YAMLIO do that.Rui Ueyama2013-09-112-19/+16
| | | | llvm-svn: 190486
* volatile types are not trivially copyable.Eli Friedman2013-09-113-4/+11
| | | | | | PR17123. llvm-svn: 190484
* Fix test.Eli Friedman2013-09-111-1/+1
| | | | llvm-svn: 190483
* Fix is_trivially_constructible preconditions.Eli Friedman2013-09-112-13/+20
| | | | | | | | | Fixes a crash in cases where the first argument was an incomplete type or an uninstantiated template type. <rdar://problem/14938471> llvm-svn: 190482
* Disable the bool and enum sanitizers when emitting the implicitly-defined copyNick Lewycky2013-09-112-10/+118
| | | | | | constructor, copy assignment operator and move assignment operator. llvm-svn: 190481
* The cleanup attribute no longer uses an unresolved, simple identifier as its ↵Aaron Ballman2013-09-117-34/+82
| | | | | | argument. Instead, it takes an expression that is fully resolved. llvm-svn: 190476
* PR17075: When performing partial ordering of a member function against aRichard Smith2013-09-114-42/+54
| | | | | | | | | | | non-member function, the number of arguments in the two candidate calls will be different (the non-member call will have one extra argument). We used to get confused by this, and fail to compare the last argument when testing whether the member is better, resulting in us always thinking it is, even if the non-member is more specialized in the last argument. llvm-svn: 190470
* Add -fansi-escape-codes optionNico Rieck2013-09-115-0/+17
| | | | | | | | | | | | | Some build systems use pipes for stdin/stderr. On nix-ish platforms colored output can be forced by -fcolor-diagnostics. On Windows this option has no effect in these cases because LLVM uses the console API (which only operates on the console buffer) even if a console wrapper capable of interpreting ANSI escape codes is used. The -fansi-escape-codes option allows switching from the console API to ANSI escape codes. It has no effect on other platforms. llvm-svn: 190464
* Get rid of unused isPodLike definition.Eli Friedman2013-09-111-2/+0
| | | | llvm-svn: 190463
* Remove unused class.Eli Friedman2013-09-111-20/+0
| | | | llvm-svn: 190462
* Fix ICE in consumed analysis when CFG is null.DeLesley Hutchins2013-09-101-2/+6
| | | | llvm-svn: 190447
* Remove unused variable.Eli Friedman2013-09-101-1/+0
| | | | llvm-svn: 190445
* getMostSpecialized for function template sets is never used in the context of aRichard Smith2013-09-104-8/+6
| | | | | | | call; remove its 'number of explicit arguments' and 'what kind of call' parameters. llvm-svn: 190444
OpenPOWER on IntegriCloud