summaryrefslogtreecommitdiffstats
path: root/clang/unittests
Commit message (Collapse)AuthorAgeFilesLines
...
* Removed ToolExecutor::isSingleProcess, it is not used by anythingDmitri Gribenko2019-08-141-2/+0
| | | | | | | | | | Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66212 llvm-svn: 368832
* [libTooling] In Transformer, generalize `applyFirst` to admit rules with ↵Yitzhak Mandelbaum2019-08-131-46/+80
| | | | | | | | | | | | | | | | | | | | | incompatible matchers. Summary: This patch removes an (artificial) limitation of `applyFirst`, which requires that all of the rules' matchers can be grouped together in a single `anyOf()`. This change generalizes the code to group the matchers into separate `anyOf`s based on compatibility. Correspondingly, `buildMatcher` is changed to `buildMatchers`, to allow for returning a set of matchers rather than just one. Reviewers: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65877 llvm-svn: 368681
* [ASTImporter] Import additional flags for functions.Balazs Keri2019-08-131-0/+49
| | | | | | | | | | | | | | | | | | Summary: At AST import of function delcarations import the flags for defaulted and deleted. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65999 llvm-svn: 368655
* [clang] Update isDerivedFrom to support Objective-C classes 🔍Stephane Moore2019-08-122-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change updates `isDerivedFrom` to support Objective-C classes by converting it to a polymorphic matcher. Notes: The matching behavior for Objective-C classes is modeled to match the behavior of `isDerivedFrom` with C++ classes. To that effect, `isDerivedFrom` matches aliased types of derived Objective-C classes, including compatibility aliases. To achieve this, the AST visitor has been updated to map compatibility aliases to their underlying Objective-C class. `isSameOrDerivedFrom` also provides similar behaviors for C++ and Objective-C classes. The behavior that `cxxRecordDecl(isSameOrDerivedFrom("X"))` does not match `class Y {}; typedef Y X;` is mirrored for Objective-C in that `objcInterfaceDecl(isSameOrDerivedFrom("X"))` does not match either `@interface Y @end typedef Y X;` or `@interface Y @end @compatibility_alias X Y;`. Test Notes: Ran clang unit tests. Reviewers: aaron.ballman, jordan_rose, rjmccall, klimek, alexfh, gribozavr Reviewed By: aaron.ballman, gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60543 llvm-svn: 368632
* [ASTImporter] Fix for import of friend class template with definition.Balazs Keri2019-08-121-0/+44
| | | | | | | | | | | | | | | | | | | | | | Summary: If there is a friend class template "prototype" (forward declaration) and later a definition for it in the existing code, this existing definition may be not found by ASTImporter because it is not linked to the prototype (under the friend AST node). The problem is fixed by looping over all found matching decls instead of break after the first found one. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65269 llvm-svn: 368551
* [clang-format] Expand AllowShortBlocksOnASingleLine for WebKitOwen Pan2019-08-111-9/+30
| | | | | | | | See PR40840 Differential Revision: https://reviews.llvm.org/D66059 llvm-svn: 368539
* [clang-format] Add SpaceInEmptyBlock option for WebKitOwen Pan2019-08-101-0/+6
| | | | | | | | See PR40840 Differential Revision: https://reviews.llvm.org/D65925 llvm-svn: 368507
* Add SVE opaque built-in typesRichard Sandiford2019-08-091-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the SVE built-in types defined by the Procedure Call Standard for the Arm Architecture: https://developer.arm.com/docs/100986/0000 It handles the types in all relevant places that deal with built-in types. At the moment, some of these places bail out with an error, including: (1) trying to generate LLVM IR for the types (2) trying to generate debug info for the types (3) trying to mangle the types using the Microsoft C++ ABI (4) trying to @encode the types in Objective C (1) and (2) are fixed by follow-on patches but (unlike this patch) they deal mostly with target-specific LLVM details, so seemed like a logically separate change. There is currently no spec for (3) and (4), so reporting an error seems like the correct behaviour for now. The intention is that the types will become sizeless types: http://lists.llvm.org/pipermail/cfe-dev/2019-June/062523.html The main purpose of the sizeless type extension is to diagnose impossible or dangerous uses of the types, such as any that would require sizeof to have a meaningful defined value. Until then, the patch sets the alignments of the types to the values specified in the link above. It also sets the sizes of the types to zero, which is chosen to be consistently wrong and shouldn't affect correctly-written code (i.e. code that would compile even with the sizeless type extension). The patch adds the common subset of functionality needed to test the sizeless type extension on the one hand and to provide SVE intrinsic functions on the other. After this patch, the two pieces of work are essentially independent. The patch is based on one by Graham Hunter: https://reviews.llvm.org/D59245 Differential Revision: https://reviews.llvm.org/D62960 llvm-svn: 368413
* [AST] No longer visiting CXXMethodDecl bodies created by compiler when ↵Johan Vikstrom2019-08-092-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | method was default created. Summary: Clang generates function bodies and puts them in the AST for default methods if it is defaulted outside the class definition. ` struct A { A &operator=(A &&O); }; A &A::operator=(A &&O) = default; ` This will generate a function body for the `A &A::operator=(A &&O)` and put it in the AST. This body should not be visited if implicit code is not visited as it is implicit. This was causing SemanticHighlighting in clangd to generate duplicate tokens and putting them in weird places. Reviewers: hokein, ilya-biryukov, gribozavr Subscribers: mgorny, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65938 llvm-svn: 368402
* Use ASSERT_THAT_ERROR instead of logAllUnhandledErrors/exitDmitri Gribenko2019-08-092-43/+10
| | | | | | | | | | | | | | Summary: ASSERT_THAT_ERROR looks like the intended helper for use in tests. Reviewers: plotfi, jkorous, compnerd Subscribers: mgorny, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65853 llvm-svn: 368399
* [clang-scan-deps] Add minimizer support for C++20 modules.Michael J. Spencer2019-08-091-2/+51
| | | | | | This only adds support to the minimizer, it doesn't actually capture the dependencies yet. llvm-svn: 368381
* [clang][NFC] Move matcher ignoringElidableConstructorCall's tests to ↵Yitzhak Mandelbaum2019-08-082-85/+85
| | | | | | | | | | | | | | | | | | | appropriate file. Summary: `ignoringElidableConstructorCall` is a traversal matcher, but its tests are grouped with narrowing-matcher tests. This revision moves them to the correct file. Reviewers: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65963 llvm-svn: 368326
* [clang] Update `ignoringElidableConstructorCall` matcher to ignore ↵Yitzhak Mandelbaum2019-08-081-0/+17
| | | | | | | | | | | | | | | | | | | `ExprWithCleanups`. Summary: The `ExprWithCleanups` node is added to the AST along with the elidable CXXConstructExpr. If it is the outermost node of the node being matched, ignore it as well. Reviewers: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65944 llvm-svn: 368319
* [clang-format] fix crash involving invalid preprocessor lineKrasimir Georgiev2019-08-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This (invalid) fragment is crashing clang-format: ``` #if 1 int x; #elif int y; #endif ``` The reason being that the parser expects a token after `#elif`, and the subsequent parsing of the next line does not check if `CurrentToken` is null. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65940 llvm-svn: 368280
* Remove LLVM mutexes from clang in favor of std::mutexBenjamin Kramer2019-08-071-1/+0
| | | | | | | None of those need to be recursive mutexes. No functionality change intended. llvm-svn: 368173
* [ASTImporter] Do not import FunctionTemplateDecl in record twice.Balazs Keri2019-08-071-0/+46
| | | | | | | | | | | | | | | | | | | | | Summary: For functions there is a check to not duplicate the declaration if it is in a record (class). For function templates there was no similar check, if a template (in the same class) was imported multiple times the FunctionTemplateDecl was created multiple times with the same templated FunctionDecl. This can result in problems with the declaration chain. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65203 llvm-svn: 368163
* [clang] Fix mismatched args constructing AddressSpaceAttr.Anton Bikineev2019-08-071-0/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D65589 llvm-svn: 368152
* Remove inclusion of a private gmock header from a testDmitri Gribenko2019-08-071-1/+0
| | | | llvm-svn: 368132
* [clang][DirectoryWatcher][NFC] Swapping asserts for llvm fatal_error in createPuyan Lotfi2019-08-061-57/+99
| | | | | | | | | | | | | | I also have replaced all the instances of "auto DW = DirectoryWatcher::create" with llvm::Expected<std::unique_ptr<DirectoryWatcher>> DW = DirectoryWatcher::create to make it more clear that DirectoryWatcher::create is returning an Expected. I've also allowed for logAllUnhandledErrors to consume errors in the case were DirectoryWatcher::create produces them. Differential Revision: https://reviews.llvm.org/D65829 llvm-svn: 368108
* [Syntax] Do not add a node for 'eof' into the treeIlya Biryukov2019-08-061-9/+8
| | | | | | | | | | | | | | | | | | Summary: While useful as a sentinel value when iterating over tokens, having 'eof' in the tree, seems to do more harm than good. Reviewers: sammccall Reviewed By: sammccall Subscribers: javed.absar, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64576 llvm-svn: 368062
* [AST] Traverse attributes inside DEF_TRAVERSE_DECL macroIlya Biryukov2019-08-062-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of traversing inside the TraverseDecl() function. Previously the attributes were traversed after Travese(Some)Decl returns. Logically attributes are properties of particular Decls and should be traversed alongside other "child" nodes. None of the tests relied on this behavior, hopefully this is an indication that the change is relatively safe. This change started with a discussion on cfe-dev, for details see: https://lists.llvm.org/pipermail/cfe-dev/2019-July/062899.html Reviewers: rsmith, gribozavr Reviewed By: gribozavr Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64907 llvm-svn: 368052
* [clang][DirectoryWatcher] Adding llvm::Expected error handling to create.Puyan Lotfi2019-08-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this patch Unix style errno error reporting from the inotify layer was used by DirectoryWatcher::create to simply return a nullptr on error. This would generally be ok, except that in LLVM we have much more robust error reporting through the facilities of llvm::Expected. The other critical thing I stumbled across was that the unit tests for DirectoryWatcher were not failing abruptly when inotify_init() was reporting an error, but would continue with the testing and eventually hit a deadlock in a pathological machine state (ie in the unit test, the return nullptr on ::create was ignored). Generally this pathological state never happens on any build bot, so it is totally understandable that it was overlooked, but on a Linux desktop running a dubious desktop environment (which I will not name) there is a chance that said desktop environment could use up enough inotify instances to exceed the user's limit. These are the conditions that led me to hit the deadlock I am addressing in this patch with more robust error handling. With the new llvm::Expected error handling when your system runs out of inotify instances for your user, the unit test will be forced to handle the error or crash and report the issue to the user instead of weirdly deadlocking on a condition variable wait. Differential Revision: https://reviews.llvm.org/D65704 llvm-svn: 367979
* [NFC][DirectoryWatchedTests] Unlocks mutexes before signaling condition variablePuyan Lotfi2019-08-061-2/+6
| | | | | | | | | | | | | | | | | This should not affect actual behavior, but should pessimize the threading less by avoiding the situation where: * mutex is still locked * T1 notifies on condition variable * T2 wakes to check mutex * T2 sees mutex is still locked * T2 waits * T1 unlocks mutex * T2 tries again, acquires mutex. Differential Revision: https://reviews.llvm.org/D65708 llvm-svn: 367968
* [AST] Fix buildbot failure because of raw string inside macro from 367839.Johan Vikstrom2019-08-051-1/+1
| | | | llvm-svn: 367892
* [AST] Fix RecursiveASTVisitorTest multiline string literal. NFCDavid Green2019-08-051-3/+3
| | | | | | | | Some compiler, notably older gccs (< 8) can have trouble with multiline raw string literals inside macros. This just moves the code outsize the macro, to attempt to appease the bots. llvm-svn: 367885
* Move LangStandard*, InputKind::Language to BasicRainer Orth2019-08-053-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a prerequisite for using LangStandard from Driver in https://reviews.llvm.org/D64793. It moves LangStandard* and InputKind::Language to Basic. It is mostly mechanical, with only a few changes of note: - enum Language has been changed into enum class Language : uint8_t to avoid a clash between OpenCL in enum Language and OpenCL in enum LangFeatures and not to increase the size of class InputKind. - Now that getLangStandardForName, which is currently unused, also checks both canonical and alias names, I've introduced a helper getLangKind which factors out a code pattern already used 3 times. The patch has been tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. There's a companion patch for lldb which uses LangStandard.h (https://reviews.llvm.org/D65717). While polly includes isl which in turn uses InputKind::C, that part of the code isn't even built inside the llvm tree. I've posted a patch to allow for both InputKind::C and Language::C upstream (https://groups.google.com/forum/#!topic/isl-development/6oEvNWOSQFE). Differential Revision: https://reviews.llvm.org/D65562 llvm-svn: 367864
* [AST] Fix RecursiveASTVisitor visiting implicit constructor initializers.Johan Vikstrom2019-08-052-0/+58
| | | | | | | | | | | | | | Summary: RecursiveASTVisitor was visiting implcit constructor initializers. This caused semantic highlighting in clangd to emit error logs. Fixes this by checking if the constructor is written or if the visitor should visit implicit decls. Reviewers: hokein, ilya-biryukov Subscribers: kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65735 llvm-svn: 367839
* [clang-format] Fix a bug that doesn't break braces before unions for AllmanOwen Pan2019-08-021-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D65631 llvm-svn: 367648
* [DirectoryWatcher] Relax assumption to prevent test flakinessJan Korous2019-08-011-1/+1
| | | | llvm-svn: 367632
* Fix Windows branch of FileManagerTest changesHarlan Haskins2019-08-011-1/+1
| | | | llvm-svn: 367622
* Fix use-after-move in ClangBasicTestsHarlan Haskins2019-08-011-1/+1
| | | | llvm-svn: 367620
* [clang] Adopt new FileManager error-returning APIsHarlan Haskins2019-08-015-19/+30
| | | | | | | Update the callers of FileManager::getFile and FileManager::getDirectory to handle the new llvm::ErrorOr-returning methods. Signed-off-by: Harlan Haskins <harlan@apple.com> llvm-svn: 367616
* [clang] Adopt llvm::ErrorOr in FileManager methodsHarlan Haskins2019-08-011-37/+45
| | | | | | | Previously, the FileManager would use NULL returns to signify whether a file existed, but that doesn’t cover permissions issues or anything else that might occur while trying to stat or read a file. Instead, convert getFile and getDirectory into returning llvm::ErrorOr Signed-off-by: Harlan Haskins <harlan@apple.com> llvm-svn: 367615
* [Preprocessor] Always discard body of #define if we failed to parse itIlya Biryukov2019-08-011-0/+15
| | | | | | | | | | | | | | | | | | | | Summary: Preivously we would only discard it if we failed to parse parameter lists. If we do not consume the body, parser sees tokens inside directive. In turn, this leads to spurious diagnostics and a crash in TokenBuffer, see the added tests. Reviewers: sammccall Reviewed By: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65517 llvm-svn: 367530
* Remove cache for macro arg stringizationReid Kleckner2019-07-301-5/+8
| | | | | | | | | | | | | | | | | | | Summary: The cache recorded the wrong expansion location for all but the first stringization. It seems uncommon to stringize the same macro argument multiple times, so this cache doesn't seem that important. Fixes PR39942 Reviewers: vsk, rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65428 llvm-svn: 367337
* clang-format: Support `if CONSTEXPR` if CONSTEXPR is a macro.Nico Weber2019-07-271-0/+89
| | | | | | | | | | | | | | | | | | | | | | This is like r305666 (which added support for `if constexpr`) except that it allows a macro name after the if. This is slightly tricky for two reasons: 1. r305666 didn't add test coverage for all cases where it added a kw_constexpr, so I had to figure out what all the added cases were for. I now added tests for all `if constexpr` bits that didn't have tests. (This took a while, see e.g. https://reviews.llvm.org/D65223) 2. Parsing `if <ident> (` as an if means that `#if defined(` and `#if __has_include(` parse as ifs too. Add some special-case code to prevent this from happening where it's incorrect. Fixes PR39248. Differential Revision: https://reviews.llvm.org/D65227 llvm-svn: 367167
* [clang] Remove IsDerivedFromDeathTest.DiesOnEmptyBaseName test.Anton Bikineev2019-07-251-7/+0
| | | | | | | The semantics of an empty basename passed to isDerivedFrom matchers changed in r367022, so this test is no longer relevant. llvm-svn: 367026
* [clang] Fail for empty names in is*DerivedFrom matchers.Anton Bikineev2019-07-251-0/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D65279 llvm-svn: 367022
* [clang] Add isDirectlyDerivedFrom AST matcher.Anton Bikineev2019-07-251-0/+30
| | | | | | Differential Revision: https://reviews.llvm.org/D65092 llvm-svn: 367010
* [ASTImporter] Reorder fields after structure import is finishedGabor Marton2019-07-251-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | We reorder declarations in RecordDecls because they may have another order in the "to" context than they have in the "from" context. This may happen e.g when we import a class like this: struct declToImport { int a = c + b; int b = 1; int c = 2; }; During the import of `a` we import first the dependencies in sequence, thus the order would be `c`, `b`, `a`. We will get the normal order by first removing the already imported members and then adding them in the order as they apper in the "from" context. Keeping field order is vital because it determines structure layout. Reviewers: a_sidorin, shafik Tags: #clang Differential Revision: https://reviews.llvm.org/D44100 llvm-svn: 366997
* clang-format: Add another test like r366926Nico Weber2019-07-241-0/+1
| | | | llvm-svn: 366929
* clang-format: Add a test that shows that some code I thought was dead is ↵Nico Weber2019-07-241-0/+1
| | | | | | not dead. llvm-svn: 366926
* [CrossTU] Add a function to retrieve original source location.Balazs Keri2019-07-241-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: A new function will be added to get the original SourceLocation for a SourceLocation that was imported as result of getCrossTUDefinition. The returned SourceLocation is in the context of the (original) SourceManager for the original source file. Additionally the ASTUnit object for that source file is returned. This is needed to get a SourceManager to operate on with the returned source location. The new function works if multiple different source files are loaded with the same CrossTU context. Reviewers: martong, shafik Reviewed By: martong Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65064 llvm-svn: 366884
* clang-format: Fix namespace end comments for namespaces with attributes and ↵Nico Weber2019-07-232-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macros. Fixes PR39247. While here, also make C++20 `namespace A::inline B::inline C` nested inline namespaced definitions work. Before: #define DEPRECATE_WOOF [[deprecated("meow")]] namespace DEPRECATE_WOOF woof { void f() {} } // namespace DEPRECATE_WOOFwoof namespace [[deprecated("meow")]] woof { void f() {} } // namespace [[deprecated("meow")]]woof namespace woof::inline bark { void f() {} } // namespace woof::inlinebark Now: #define DEPRECATE_WOOF [[deprecated("meow")]] namespace DEPRECATE_WOOF woof { void f() {} } // namespace woof namespace [[deprecated("meow")]] woof { void f() {} } // namespace woof namespace woof::inline bark { void f() {} } // namespace woof::inline bark (In addition to the fixed namespace end comments, also note the correct indent of the namespace contents.) Differential Revision: https://reviews.llvm.org/D65125 llvm-svn: 366831
* [ASTImporter] Fix inequivalence of ClassTemplateInstantiationsGabor Marton2019-07-231-0/+192
| | | | | | | | | | | | | | | | | | Summary: We falsely state inequivalence if the template parameter is a qualified/nonquialified template in the first/second instantiation. Also, different kinds of TemplateName should be equal if the template decl (if available) is equal (even if the name kind is different). Reviewers: a_sidorin, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64241 llvm-svn: 366818
* Adds support for formatting NS_CLOSED_ENUM and CF_CLOSED_ENUM alongside ↵Ben Hamilton2019-07-222-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NS_ENUM and CF_ENUM. Summary: Addresses the formatting of NS_CLOSED_ENUM and CF_CLOSED_ENUM, introduced in Swift 5. Before: ``` typedef NS_CLOSED_ENUM(NSInteger, Foo){FooValueOne = 1, FooValueTwo, FooValueThree}; ``` After: ``` typedef NS_CLOSED_ENUM(NSInteger, Foo) { FooValueOne = 1, FooValueTwo, FooValueThree }; ``` Contributed by heijink. Reviewers: benhamilton, krasimir Reviewed By: benhamilton Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65012 llvm-svn: 366719
* [AST] Treat semantic form of InitListExpr as implicit code in traversalsIlya Biryukov2019-07-221-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: In particular, do not traverse the semantic form if shouldVisitImplicitCode() returns false. This simplifies the common case of traversals, avoiding the need to worry about some expressions being traversed twice. No tests break after the change, the change would allow to simplify at least one of the usages, i.e. r366070 which had to handle this in clangd. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64762 llvm-svn: 366672
* Disallow most calling convention attributes on PS4Sunil Srivastava2019-07-191-0/+2
| | | | | | | | PS4 now only allows "cdecl", and its equivalent on PS4, "sysv_abi". Differential Revision: https://reviews.llvm.org/D64780 llvm-svn: 366617
* [Format/ObjC] Avoid breaking between unary operators and operandsBen Hamilton2019-07-191-0/+12
| | | | | | | | | | | | | | | | | | | | Summary: Test Plan: New tests added. Ran tests with: % ninja FormatTests && ./tools/clang/unittests/Format/FormatTests Confirmed tests failed before change and passed after change. Reviewers: krasimir, djasper, sammccall, klimek Reviewed By: sammccall Subscribers: klimek, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64775 llvm-svn: 366592
* [clang-scan-deps] Dependency directives source minimizer: handle #pragma onceAlex Lorenz2019-07-181-0/+24
| | | | | | | | | We should re-emit `#pragma once` to ensure the preprocessor will still honor it when running on minimized sources. Differential Revision: https://reviews.llvm.org/D64945 llvm-svn: 366509
OpenPOWER on IntegriCloud