summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix nullptr crash in -Wthread-safety-betaReid Kleckner2015-11-052-1/+8
| | | | llvm-svn: 252107
* The control expression for a _Generic selection expression should haveAaron Ballman2015-11-052-5/+15
| | | | | | | its type decayed and qualifiers stripped when determining which selection it matches. Fixes PR16340. llvm-svn: 252104
* clang-format: Turn on wrapping before "else" for WebKit style.Daniel Jasper2015-11-041-0/+1
| | | | llvm-svn: 252089
* Fix some Clang-tidy modernize warnings, other minor fixes.Eugene Zelenko2015-11-045-39/+42
| | | | | | Differential revision: http://reviews.llvm.org/D14311 llvm-svn: 252081
* [analyzer] Add 'optin' checker package and move localizability checkers into it.Devin Coughlin2015-11-044-15/+46
| | | | | | | | | | | | | | | | | | | | | | This commit creates a new 'optin' top-level checker package and moves several of the localizability checkers into it. This package is for checkers that are not alpha and that would normally be on by default but where the driver does not have enough information to determine when they are applicable. The localizability checkers fit this criterion because the driver cannot determine whether a project is localized or not -- this is best determined at the IDE or build-system level. This new package is *not* intended for checkers that are too noisy to be on by default. The hierarchy under 'optin' mirrors that in 'alpha': checkers under 'optin' should be organized in the hierarchy they would have had if they were truly top level (e.g., optin.osx.cocoa.MyOptInChecker). Differential Revision: http://reviews.llvm.org/D14303 llvm-svn: 252080
* Fixed a link.Alexander Kornienko2015-11-041-1/+1
| | | | llvm-svn: 252069
* Fixed header levels.Alexander Kornienko2015-11-041-2/+2
| | | | llvm-svn: 252068
* Removed mentions of clang-modernize, added a short description of clang-tidy.Alexander Kornienko2015-11-041-33/+9
| | | | llvm-svn: 252066
* [modules] Generalize the workaround for multiple ambiguous definitions ofRichard Smith2015-11-047-33/+87
| | | | | | | | | | | | | internal linkage entities in different modules from r250884 to apply to all names, not just function names. This is really awkward: we don't want to merge internal-linkage symbols from separate modules, because they might not actually be defining the same entity. But we don't want to reject programs that use such an ambiguous symbol if those internal-linkage symbols are in fact equivalent. For now, we're resolving the ambiguity by picking one of the equivalent definitions as an extension. llvm-svn: 252063
* [Concepts] Add diagnostics which fall under [dcl.spec.concept]p1Nathan Wilson2015-11-042-0/+7
| | | | | | | | | | | | Summary: Diagnose when the 'concept' specifier is used on a typedef or function parameter. Reviewers: rsmith, hubert.reinterpretcast, aaron.ballman, faisalv Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14316 llvm-svn: 252061
* clang-cl: Parse the /guard:cf[-] flag (PR25400)Hans Wennborg2015-11-042-0/+3
| | | | llvm-svn: 252056
* Improving the diagnostic for cases where the attribute only appertains to a ↵Aaron Ballman2015-11-045-9/+12
| | | | | | function with a prototype. llvm-svn: 252055
* Allow compound assignment expressions to be contracted when licensed by the ↵Stephen Canon2015-11-041-1/+1
| | | | | | language or pragma. llvm-svn: 252050
* Silence "enumeral and non-enumeral type in conditional expression" warning; NFC.Aaron Ballman2015-11-041-1/+1
| | | | llvm-svn: 252047
* Initialize member field.Erik Verbruggen2015-11-041-1/+1
| | | | llvm-svn: 252045
* [Sema] Implement __make_integer_seqDavid Majnemer2015-11-0423-4/+308
| | | | | | | | | | | | | | | | | | This new builtin template allows for incredibly fast instantiations of templates like std::integer_sequence. Performance numbers follow: My work station has 64 GB of ram + 20 Xeon Cores at 2.8 GHz. __make_integer_seq<std::integer_sequence, int, 90000> takes 0.25 seconds. std::make_integer_sequence<int, 90000> takes unbound time, it is still running. Clang is consuming gigabytes of memory. Differential Revision: http://reviews.llvm.org/D13786 llvm-svn: 252036
* [analyzer] Move the ObjCGenericsChecker out of the alpha package.Devin Coughlin2015-11-033-7/+7
| | | | | | | It is now in the osx.cocoa package and so will be on by default for Apple toolchains. llvm-svn: 251966
* Introduce module file extensions to piggy-back data onto module files.Douglas Gregor2015-11-0328-71/+831
| | | | | | | | | | | | | | | | | | | | | Introduce the notion of a module file extension, which introduces additional information into a module file at the time it is built that can then be queried when the module file is read. Module file extensions are identified by a block name (which must be unique to the extension) and can write any bitstream records into their own extension block within the module file. When a module file is loaded, any extension blocks are matched up with module file extension readers, that are per-module-file and are given access to the input bitstream. Note that module file extensions can only be introduced by programmatic clients that have access to the CompilerInvocation. There is only one such extension at the moment, which is used for testing the module file extension harness. As a future direction, one could imagine allowing the plugin mechanism to introduce new module file extensions. llvm-svn: 251955
* Revert "Support watchOS and tvOS in compiler-rt builds"Tim Northover2015-11-031-36/+3
| | | | | | | | | | The required compiler-rt changes aren't present yet so attempting to build with compiler-rt breaks. And since we're trying to deprecate autotools we actually want to fix this in CMake primarily anyway. This reverts r251712. llvm-svn: 251953
* Simplify Sema::ProcessPropertyDecl. NFCDouglas Gregor2015-11-033-30/+8
| | | | | | | | Now that the properties created within Objective-C class extensions go into the extension themselves, we don't need any of the extra complexity here. llvm-svn: 251949
* Remove unused #includeDavid Majnemer2015-11-031-1/+0
| | | | | | No functionality change is intended. llvm-svn: 251941
* Remove some legacy mingw-w64 gcc struct infoMartell Malone2015-11-031-4/+0
| | | | | | | | As of gcc 4.7 mingw-w64 no longer emits 128-bit structs as i128 Differential Revision: http://reviews.llvm.org/D14179 llvm-svn: 251930
* [X86] Rounding mode for roundps/pd/ss/sd builtins should be an ICE.Craig Topper2015-11-031-4/+4
| | | | llvm-svn: 251902
* Fix a couple intrinsic header comments. NFCCraig Topper2015-11-032-2/+2
| | | | llvm-svn: 251900
* [modules] Rationalize the behavior of Decl::declarationReplaces, and inRichard Smith2015-11-0311-63/+69
| | | | | | | | | particular don't assume that two declarations of the same kind in the same context are declaring the same entity. That's not true when the same name is declared multiple times as internal-linkage symbols within a module. (getCanonicalDecl is cheap now, so we can just use it here.) llvm-svn: 251898
* Eliminate "rewritten decls" from the AST writer. NFCDouglas Gregor2015-11-033-35/+10
| | | | llvm-svn: 251877
* Switch to using an explicit scope object to ensure we don't forget to pop ObjCRichard Smith2015-11-033-28/+45
| | | | | | type parameters off the scope, and fix the cases where we failed to do so. llvm-svn: 251875
* Stop back-patching 'readonly' Objective-C properties with 'readwrite' ones.Douglas Gregor2015-11-0321-279/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A 'readonly' Objective-C property declared in the primary class can effectively be shadowed by a 'readwrite' property declared within an extension of that class, so long as the types and attributes of the two property declarations are compatible. Previously, this functionality was implemented by back-patching the original 'readonly' property to make it 'readwrite', destroying source information and causing some hideously redundant, incorrect code. Simplify the implementation to express how this should actually be modeled: as a separate property declaration in the extension that shadows (via the name lookup rules) the declaration in the primary class. While here, correct some broken Fix-Its, eliminate a pile of redundant code, clean up the ARC migrator's handling of properties declared in extensions, and fix debug info's naming of methods that come from categories. A wonderous side effect of doing this write is that it eliminates the "AddedObjCPropertyInClassExtension" method from the AST mutation listener, which in turn eliminates the last place where we rewrite entire declarations in a chained PCH file or a module file. This change (which fixes rdar://problem/18475765) will allow us to eliminate the rewritten-decls logic from the serialization library, and fixes a crash (rdar://problem/23247794) illustrated by the test/PCH/chain-categories.m example. llvm-svn: 251874
* Make hasLHS and hasRHS matchers available for ArraySubscriptExprAlexander Kornienko2015-11-022-9/+18
| | | | | | | | | | | | | | Summary: The hasBase and hasIndex don't tell anything about the position of the base and the index in the code, so we need hasLHS and hasRHS in some cases. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D14212 llvm-svn: 251842
* watchOS & tvOS: add a few more tests.Tim Northover2015-11-025-15/+99
| | | | llvm-svn: 251832
* [PTH] Fix data length used for stat cache entriesReid Kleckner2015-11-021-1/+1
| | | | | | | | | | | | | | This came up in a boost build, which apparently uses PTH. This was broken in r187619 when we migrated it to uses llvm::fs instead of raw stat calls. Constructing a test case with a hash table collision in-tree is tough. Instead, I have a pending change to OnDiskChainedHashTable that asserts that the reported length of the data agrees with the data actually written. All of the existing in-tree tests find the bug with this assert. llvm-svn: 251828
* clang-format: Simplify and improve stop condition for formattingDaniel Jasper2015-11-022-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | unaffected lines with incorrect initial indent. Starting from: namespace { int i; // There shouldn't be indentation here. int j; // <- call clang-format on this line. } Before: namespace { int i; int j; } After: namespace { int i; int j; } llvm-svn: 251824
* Fix va_arg on watchOS.Tim Northover2015-11-022-6/+15
| | | | | | As in other contexts, alignments can go up to 16 bytes in a va_list. llvm-svn: 251821
* Clang format a few prior patches (NFC)Teresa Johnson2015-11-022-2/+4
| | | | | | | I had clang formatted my earlier patches using the wrong style. Reformatted with the LLVM style. llvm-svn: 251813
* Sink some PTHManager includes out of Preprocessor.hReid Kleckner2015-11-025-1/+5
| | | | | | | This reduces the number of .cpp files needed to be rebuilt after touching OnDiskHashTable from 120 to 21 for me. llvm-svn: 251810
* [x86] Front-end part of MCU psABI supportAndrey Bokhanko2015-11-023-1/+16
| | | | | | | | | | | This patch implements two things in front-end for MCU psABI support: 1) "long double type is the same as double." 2) "New predefined C/C++ pre-processor symbols: iamcu and iamcu__. Differential Revision: http://reviews.llvm.org/D14205 llvm-svn: 251786
* [MS ABI] Don't zero-initialize vbptrs in basesDavid Majnemer2015-11-025-14/+108
| | | | | | | | | | | | Certain CXXConstructExpr nodes require zero-initialization before a constructor is called. We had a bug in the case where the constructor is called on a virtual base: we zero-initialized the base's vbptr field. A complementary bug is present in MSVC where no zero-initialization occurs for the subobject at all. This fixes PR25370. llvm-svn: 251783
* clang-format: Be slightly more cautious when formatting subsequent lines ↵Daniel Jasper2015-11-012-4/+40
| | | | | | | | | | | | | | | | | after a change. With r251474, clang-format could indent the entire rest of the file, if there is a missing closing brace, e.g. while writing code in an editor. Summary: With this change, clang-format stops formatting when either it leaves the current scope or when it comes back to the initial scope after going into a nested one. Reviewers: klimek Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D14213 llvm-svn: 251760
* [MSVC Compat] Permit conversions from pointer-to-function to ↵David Majnemer2015-10-314-11/+22
| | | | | | | | | | | pointer-to-object iff -fms-compatibility We permit implicit conversion from pointer-to-function to pointer-to-object when -fms-extensions is specified. This is rather unfortunate, move this into -fms-compatibility and only permit it within system headers unless -Wno-error=microsoft-cast is specified. llvm-svn: 251738
* [CodeGen] Call SetInternalFunctionAttributes to attach functionAkira Hatanaka2015-10-316-16/+38
| | | | | | | | | | | | | | | | | attributes to internal functions. This patch fixes CodeGenModule::CreateGlobalInitOrDestructFunction to use SetInternalFunctionAttributes instead of SetLLVMFunctionAttributes to attach function attributes to internal functions. Also, make sure the correct CGFunctionInfo is passed instead of always passing what arrangeNullaryFunction returns. rdar://problem/20828324 Differential Revision: http://reviews.llvm.org/D13610 llvm-svn: 251734
* Sema: correct typo recovery with blocksSaleem Abdulrasool2015-10-312-0/+14
| | | | | | | | | | Handle blocks in the tree transform for the typo correction as otherwise, the capture may miss. This would trigger an assertion. Thanks to Doug Gregor for the help with this! Fixes PR25001. llvm-svn: 251729
* CGExprConstant.cpp: Appease Modules.NAKAMURA Takumi2015-10-301-1/+1
| | | | llvm-svn: 251713
* Support watchOS and tvOS in compiler-rt buildsTim Northover2015-10-301-3/+36
| | | | | | | Hopefully autotools will be deprecated soon and this entire file can go away, but until then... llvm-svn: 251712
* Support tvOS and watchOS availability attributesTim Northover2015-10-306-0/+140
| | | | llvm-svn: 251711
* ARMv7k: implement ABI changes for watchOS from standard iOS.Tim Northover2015-10-309-18/+473
| | | | llvm-svn: 251710
* Disable SjLj exceptions for watchOSTim Northover2015-10-305-9/+22
| | | | llvm-svn: 251709
* Watch and TV OS: wire up basic ABI choicesTim Northover2015-10-3015-9/+68
| | | | | | | This sets the mostly expected Darwin default ABI options for these two platforms. Active changes from these defaults for watchOS are in a later patch. llvm-svn: 251708
* Preprocessor: define correct tvOS and watchOS version macrosTim Northover2015-10-302-1/+38
| | | | llvm-svn: 251707
* Support watchOS and tvOS driver optionsTim Northover2015-10-3015-40/+353
| | | | | | | | This patch should add support for almost all command-line options and driver tinkering necessary to produce a correct "clang -cc1" invocation for watchOS and tvOS. llvm-svn: 251706
* Modules: Add a declaration in clang/Serialization/GlobalModuleIndex.h.NAKAMURA Takumi2015-10-301-0/+1
| | | | llvm-svn: 251703
OpenPOWER on IntegriCloud