summaryrefslogtreecommitdiffstats
path: root/clang/unittests
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang][Index] Mark references from Constructors and Destructors to class as ↵Kadir Cetinkaya2019-03-081-1/+31
| | | | | | | | | | | | | | | | | | | | | | NameReference Summary: In current indexing logic we get references to class itself when we see a constructor/destructor which is only syntactically true. Semantically this information is not correct. This patch marks that reference as NameReference to let clients deal with it. Reviewers: akyrtzi, gribozavr, nathawes, benlangmuir Reviewed By: gribozavr, nathawes Subscribers: nathawes, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58814 llvm-svn: 355668
* Fix some clang analysis tests passing arguments incorrectlyReid Kleckner2019-03-071-3/+3
| | | | llvm-svn: 355625
* [analyzer] handle modification of vars inside an expr with comma operatorPetar Jovanovic2019-03-071-0/+131
| | | | | | | | | | | | | | | | | We should track mutation of a variable within a comma operator expression. Current code in ExprMutationAnalyzer does not handle it. This will handle cases like: (a, b) ++ < == b is modified (a, b) = c < == b is modifed Patch by Djordje Todorovic. Differential Revision: https://reviews.llvm.org/D58894 llvm-svn: 355605
* [ASTImporter] Import member expr with explicit template argsGabor Marton2019-03-071-0/+50
| | | | | | | | | | | | | | | | Summary: Member expressions with explicit template arguments were not imported correctly: the DeclRefExpr was missing. This patch fixes. Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58830 llvm-svn: 355596
* [ASTImporter] Handle redecl chain of FunctionTemplateDeclsGabor Marton2019-03-071-34/+14
| | | | | | | | | | | | | | | | | | | Summary: Redecl chains of function templates are not handled well currently. We want to handle them similarly to functions, i.e. try to keep the structure of the original AST as much as possible. The aim is to not squash a prototype with a definition, rather we create both and put them in a redecl chain. Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58494 llvm-svn: 355593
* [libclang] Fix CXTranslationUnit_KeepGoingIvan Donchevskii2019-03-071-7/+6
| | | | | | | | | | | | | | | | | | Since commit 56f548bbbb7e4387a69708f70724d00e9e076153 [modules] Round-trip -Werror flag through explicit module build. the behavior of CXTranslationUnit_KeepGoing changed: Unresolved #includes are fatal errors again. As a consequence, some templates are not instantiated and lead to confusing errors. Revert to the old behavior: With CXTranslationUnit_KeepGoing fatal errors are mapped to errors. Patch by Nikolai Kosjar. Differential Revision: https://reviews.llvm.org/D58501 llvm-svn: 355586
* [clang-format] broken after lambda with return type template with boolean ↵Paul Hoad2019-03-051-0/+15
| | | | | | | | | | | | | | | | | | | | | literal Summary: A Lamdba with a return type template with a boolean literal (true,false) behaves differently to an integer literal https://bugs.llvm.org/show_bug.cgi?id=40910 Reviewers: klimek, djasper, JonasToth, alexfh, krasimir, jkorous Reviewed By: jkorous Subscribers: jkorous, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D58922 llvm-svn: 355450
* [clang-format] Fix lambdas returning template specialization that contains ↵Jan Korous2019-03-051-0/+90
| | | | | | | | | | | | operator in parameter A template specialization of a template foo<int N> can contain integer constants and a whole bunch of operators - e. g. foo< 1 ? !0 : (3+1)%4 > Inspired by https://reviews.llvm.org/D58922 Differential Revision: https://reviews.llvm.org/D58934 llvm-svn: 355434
* [ASTImporter] Fix redecl failures of Class and ClassTemplateGabor Marton2019-03-051-8/+4
| | | | | | | | | | | | | | | | | | | Summary: Redecl chains of classes and class templates are not handled well currently. We want to handle them similarly to functions, i.e. try to keep the structure of the original AST as much as possible. The aim is to not squash a prototype with a definition, rather we create both and put them in a redecl chain. Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58502 llvm-svn: 355390
* Replace clang::FileData with llvm::vfs::StatusHarlan Haskins2019-03-051-12/+11
| | | | | | | | | | | | | | | | Summary: FileData was only ever used as a container for the values in llvm::vfs::Status, so they might as well be consolidated. The `InPCH` member was also always set to false, and unused. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58924 llvm-svn: 355368
* [analyzer] Enable subcheckers to possess checker optionsKristof Umann2019-03-041-12/+20
| | | | | | | | | | | | | | | | Under the term "subchecker", I mean checkers that do not have a checker class on their own, like unix.MallocChecker to unix.DynamicMemoryModeling. Since a checker object was required in order to retrieve checker options, subcheckers couldn't possess options on their own. This patch is also an excuse to change the argument order of getChecker*Option, it always bothered me, now it resembles the actual command line argument (checkername:option=value). Differential Revision: https://reviews.llvm.org/D57579 llvm-svn: 355297
* [clang-format] clang-format off/on not respected when using C Style commentsPaul Hoad2019-03-021-0/+37
| | | | | | | | | | | | | | | | | | | Summary: If the clang-format on/off is in a /* comment */ then the sorting of headers is not ignored PR40901 - https://bugs.llvm.org/show_bug.cgi?id=40901 Reviewers: djasper, klimek, JonasToth, krasimir, alexfh Reviewed By: alexfh Subscribers: alexfh, cfe-commits, llvm-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D58819 llvm-svn: 355266
* [clang-format][TableGen] Don't add spaces around items in square braces.Jordan Rupprecht2019-03-011-0/+4
| | | | | | | | | | | | | | | | | | | Summary: clang-formatting wants to add spaces around items in square braces, e.g. [1, 2] -> [ 1, 2 ]. Based on a quick check [1], it seems like most cases are using the [1, 2] format, so make that the consistent one. [1] in llvm `.td` files, the regex `\[[^ ]` (bracket followed by not-a-space) shows up ~400 times, but `\[\s[^ ]` (bracket followed by one space and one not-a-space) shows up ~40 times => ~90% uses this format. Reviewers: djasper, krasimir, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: MyDeveloperDay, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D55964 llvm-svn: 355158
* [clang-format][NFC] Allow getLLVMStyle() to take a languageJordan Rupprecht2019-02-281-0/+9
| | | | | | | | | | | | | | | | | | | Summary: getLLVMStyle() sets the default style, but doesn't take the language as a parameter, so can't set default parameters when they differ from C++. This change adds LanguageKind as an input to getLLVMStyle so that we can start doing that. See D55964 as a motivation for this, where we want Tablegen to be formatted differently than C++. Reviewers: djasper, krasimir, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: jdoerfert, MyDeveloperDay, kristina, cfe-commits, arphaman Tags: #clang Differential Revision: https://reviews.llvm.org/D56943 llvm-svn: 355123
* [ASTImporter] Add support for importing ChooseExpr AST nodes.Tom Roeder2019-02-262-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This allows ASTs to be merged when they contain ChooseExpr (the GNU __builtin_choose_expr construction). This is needed, for example, for cross-CTU analysis of C code that makes use of __builtin_choose_expr. The node is already supported in the AST, but it didn't have a matcher in ASTMatchers. So, this change adds the matcher and adds support to ASTImporter. This was originally reviewed and approved in https://reviews.llvm.org/D58292 and submitted as r354832. It was reverted in r354839 due to failures on the Windows CI builds. This version fixes the test failures on Windows, which were caused by differences in template expansion between versions of clang on different OSes. The version of clang built with MSVC and running on Windows never expands the template in the C++ test in ImportExpr.ImportChooseExpr in clang/unittests/AST/ASTImporter.cpp, but the version on Linux does for the empty arguments and -fms-compatibility. So, this version of the patch drops the C++ test for __builtin_choose_expr, since that version was written to catch regressions of the logic for isConditionTrue() in the AST import code for ChooseExpr, and those regressions are also caught by ASTImporterOptionSpecificTestBase.ImportChooseExpr, which does work on Windows. Reviewers: shafik, a_sidorin, martong, aaron.ballman, rnk, a.sidorin Subscribers: cfe-commits, jdoerfert, rnkovacs, aaron.ballman Tags: #clang Differential Revision: https://reviews.llvm.org/D58663 llvm-svn: 354916
* [clang-format] SpaceBeforeParens for lambda expressionsAndrew Ng2019-02-261-0/+2
| | | | | | | | | Add support for lambda expressions to the SpaceBeforeParens formatting option. Differential Revision: https://reviews.llvm.org/D58241 llvm-svn: 354880
* [clang][Index] Visit UsingDecls and generate USRs for themKadir Cetinkaya2019-02-261-0/+17
| | | | | | | | | | | | | | | | | Summary: Add indexing of UsingDecl itself. Also enable generation of USRs for UsingDecls, using the qualified name of the decl. Reviewers: ilya-biryukov, akyrtzi Subscribers: arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58340 llvm-svn: 354878
* [CodeComplete] Propagate preferred type for function arguments in more casesIlya Biryukov2019-02-261-0/+37
| | | | | | | | | | | | | | | | | | | | | Summary: See the added test for some new cases. This change also removes special code completion calls inside the ParseExpressionList function now that we properly propagate expected type to the function responsible for parsing elements of the expression list (ParseAssignmentExpression). Reviewers: kadircet Reviewed By: kadircet Subscribers: xbolva00, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58541 llvm-svn: 354864
* Revert r354832 "[ASTImporter] Add support for importing ChooseExpr AST nodes."Reid Kleckner2019-02-262-54/+0
| | | | | | Test does not pass on Windows llvm-svn: 354839
* [ASTImporter] Add support for importing ChooseExpr AST nodes.Tom Roeder2019-02-252-0/+54
| | | | | | | | | | | | | | | | | | | | | Summary: This allows ASTs to be merged when they contain ChooseExpr (the GNU __builtin_choose_expr construction). This is needed, for example, for cross-CTU analysis of C code that makes use of __builtin_choose_expr. The node is already supported in the AST, but it didn't have a matcher in ASTMatchers. So, this change adds the matcher and adds support to ASTImporter. Reviewers: shafik, a_sidorin, martong, aaron.ballman Subscribers: aaron.ballman, rnkovacs, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58292 llvm-svn: 354832
* [CodeComplete] Collect visited contexts when scope specifier is invalid.Eric Liu2019-02-211-3/+7
| | | | | | | | | | | | | | | | | Summary: This will allow completion consumers to guess the specified scope by putting together scopes in the context with the specified scope (e.g. when the specified namespace is not imported yet). Reviewers: ilya-biryukov Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58446 llvm-svn: 354570
* [clang][Index] Enable indexing of Template Type Parameters behind a flagKadir Cetinkaya2019-02-211-0/+24
| | | | | | | | | | | | | | | | | Summary: clangd uses indexing api to provide references and it was not possible to perform symbol information for template parameters. This patch enables visiting of TemplateTypeParmTypeLocs. Reviewers: ilya-biryukov, akyrtzi Subscribers: javed.absar, kristof.beyls, ioeric, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58293 llvm-svn: 354560
* Fix remaining semicolon pedantic errors for intelGabor Marton2019-02-201-2/+2
| | | | llvm-svn: 354503
* Fix compile error with Intel's compiler (-Werror=pedantic)Gabor Marton2019-02-201-60/+60
| | | | | | | An extra semicolon at the end of macro invocations caused a build bot failure for Intel's compiler when pedantic is turned on. llvm-svn: 354482
* [clang-format] Do not emit replacements if Java imports are OKKrasimir Georgiev2019-02-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently clang-format would always emit a replacement for a block of Java imports even if it is correctly formatted: ``` % cat /tmp/Aggregator.java import X; % clang-format /tmp/Aggregator.java import X; % clang-format -output-replacements-xml /tmp/Aggregator.java <?xml version='1.0'?> <replacements xml:space='preserve' incomplete_format='false'> <replacement offset='0' length='9'>import X;</replacement> </replacements> % ``` This change makes clang-format not emit replacements in this case. Note that there is logic to not emit replacements in this case for C++. Reviewers: ioeric Reviewed By: ioeric Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58436 llvm-svn: 354452
* [clang][test] Fix FileManagerTest.getFileDontOpenRealPath for WindowsJan Korous2019-02-181-6/+10
| | | | llvm-svn: 354296
* Reland "[clang][FileManager] fillRealPathName even if we aren't opening the ↵Jan Korous2019-02-181-0/+29
| | | | | | | | | file" This reverts commit e2bb3121fd4ab5b01f9ec1d2e3e9877db9c6a54c. + fixed test for Windows llvm-svn: 354291
* [ASTImporter] Find previous friend function templateGabor Marton2019-02-181-0/+30
| | | | | | | | | | | | Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57910 llvm-svn: 354267
* [clang][Index] Fix usage of IndexImplicitInstantiationKadir Cetinkaya2019-02-181-3/+85
| | | | | | | | | | | | | | Summary: Indexing context was skipping explicit template instantiations as well. This patch makes sure it only skips implicit ones. Subscribers: arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58189 llvm-svn: 354262
* [ASTImporter] Unify redecl chain tests as type parameterized testsGabor Marton2019-02-181-641/+556
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch unifies all those tests which check the correctness of the redecl chains. Previously we had several structurally very similar test cases for each language construct (class, function, variable, function template, ...). We still use value-parameterized tests for the different AST compatibility switches (-fdelayed-template-parsing, -fms-compatibility). Gtest makes it possible to have either value-parameterized or type-parameterized fixtures. However, we cannot have both value- and type-parameterized test fixtures. So we use a value-parameterized test fixture in the gtest sense. We intend to mimic gtest's type-parameters via the type template parameter. We manually instantiate the different tests with the each types. After this patch I am planning to put the "generic redecl chain" related tests into their own separate test file (in another patch). Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Differential Revision: https://reviews.llvm.org/D57236 llvm-svn: 354259
* Move multiline raw string literal out of macro. NFCDavid Green2019-02-161-18/+16
| | | | | | | | Certain combinations of gcc and ccache fail when the raw string literal is preprocessed. This just moves the string out as is done elsewhere in the same file. llvm-svn: 354201
* clang-format with UseTab: Always sometimes doesn't insert the right amount ↵Alexander Kornienko2019-02-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of tabs. Trailing comments are not always aligned properly when UseTab is set to Always. Consider: int a; // x int bbbbbbbb; // x With .clang-format: --- Language: Cpp BasedOnStyle: LLVM UseTab: Always ... The trailing comments of this code block should be aligned, but aren't To align the first trailing comment it needs to insert 8 spaces. This should be one tab plus six spaces. It skips the logic of the first partial tab in FirstTabWidth (=2) + Style.TabWidth (=8) <= Spaces (=8) and only inserts one tab. Proposed fix and test is attached. Patch by Hylke Kleve. Differential revision: https://reviews.llvm.org/D57655 llvm-svn: 354183
* Revert r354075 "[clang][FileManager] fillRealPathName even if we aren't ↵Reid Kleckner2019-02-151-14/+0
| | | | | | | | opening the file" The new test doesn't pass on Windows. llvm-svn: 354169
* Exteded test of .Yitzhak Mandelbaum2019-02-151-9/+13
| | | | llvm-svn: 354136
* Remove unnecessary expectation.Yitzhak Mandelbaum2019-02-151-1/+0
| | | | llvm-svn: 354135
* Added test for matcher On.Yitzhak Mandelbaum2019-02-151-12/+14
| | | | llvm-svn: 354134
* Add tests for assorted `CXXMemberCallExpr` matchers.Yitzhak Mandelbaum2019-02-151-0/+89
| | | | | | | | | | Summary: Add tests for matchers `on`, `onImplicitObjectArgument` and `hasObjectExpression`. Reviewers: alexfh, steveire, aaron.ballman Differential Revision: https://reviews.llvm.org/D56850 llvm-svn: 354133
* [ASTImporter] Import every Decl in lambda recordGabor Marton2019-02-151-0/+20
| | | | | | | | | | | | | | | | | | | | Summary: Previously only the fields were imported. Now every Decl is imported. This way the destructor decl is not missing after import. Patch by balazske (Balázs Kéri) Reviewers: a.sidorin, shafik Reviewed By: shafik Subscribers: balazske, cfe-commits, Szelethus, martong, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D57740 llvm-svn: 354120
* [clang][FileManager] fillRealPathName even if we aren't opening the fileJan Korous2019-02-141-0/+14
| | | | | | | | | | | | | The pathname wasn't previously filled when the getFile() method was called with openFile = false. We are caching FileEntry-s in ParsedAST::Includes in clangd and this caused the problem. This fixes an internal test failure in clangd - ClangdTests.GoToInclude.All rdar://47536127 Differential Revision: https://reviews.llvm.org/D58213 llvm-svn: 354075
* [ASTImporter] Check visibility/linkage of functions and variablesGabor Marton2019-02-141-0/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: During import of a global variable with external visibility the lookup will find variables (with the same name) but with static visibility. Clearly, we cannot put them into the same redecl chain. The same is true in case of functions. In this fix we filter the lookup results and consider only those which have the same visibility as the decl we currently import. We consider two decls in two anonymous namsepaces to have the same visibility only if they are imported from the very same translation unit. Reviewers: a_sidorin, shafik, a.sidorin Reviewed By: shafik Subscribers: jdoerfert, balazske, rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57232 llvm-svn: 354027
* [clang][Index] Add a knob to index function parameters in declarationsKadir Cetinkaya2019-02-111-0/+15
| | | | | | | | | | | | | | | | | Summary: Parameters in declarations are useful for clangd, so that we can provide symbol information for them as well. It also helps clangd to be consistent whether a function's definition is accessible or not. Reviewers: hokein, akyrtzi Subscribers: ilya-biryukov, ioeric, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57949 llvm-svn: 353695
* [ASTImporter] Add test RedeclChainShouldBeCorrectAmongstNamespacesGabor Marton2019-02-111-0/+41
| | | | | | | | | | | | | | | | | Summary: We add a new test to show that redecl chains are not handled properly amongst namespaces. We cannot pass this test now, so this is disabled. Subsequent patches will make this test pass. Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57901 llvm-svn: 353684
* Use llvm::is_contained. NFCFangrui Song2019-02-101-1/+1
| | | | llvm-svn: 353635
* [Format/ObjC] Fix [foo bar]->baz formatting as lambda arrowBen Hamilton2019-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, `UnwrappedLineParser` thinks an arrow token after an ObjC method expression is a C++ lambda arrow, so it formats: ``` [foo bar]->baz ``` as: ``` [foo bar] -> baz ``` Because `UnwrappedLineParser` runs before `TokenAnnotator`, it can't know if the arrow token is after an ObjC method expression or not. This diff makes `TokenAnnotator` remove the TT_LambdaArrow on the arrow token if it follows an ObjC method expression. Test Plan: New test added. Ran test with: % ninja FormatTests && ./tools/clang/unittests/Format/FormatTests Confirmed test failed before diff and passed after diff. Reviewers: krasimir, djasper, sammccall Reviewed By: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57923 llvm-svn: 353531
* [ASTImporter][ASTImporterSpecificLookup] Add test for different operatorsGabor Marton2019-02-081-0/+60
| | | | | | | | | | | | | | | | | Summary: This is to check that operators are handled properly in `ASTImporterSpecificLookup`. Note, this lookup table is not used in LLDB, only in CTU. Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57905 llvm-svn: 353505
* [AST] Fix structural inequivalence of operatorsGabor Marton2019-02-081-0/+27
| | | | | | | | | | | | | | Summary: Operators kind was not checked, so we reported e.g. op- to be equal with op+ Reviewers: shafik, a_sidorin, aaron.ballman Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57902 llvm-svn: 353504
* [ASTImporter] Refactor unittests to be able to parameterize them in a more ↵Gabor Marton2019-02-071-83/+110
| | | | | | | | | | | | | | | | | | | | | | flexible way Summary: Currently `TestImportBase` is derived from `ParameterizedTestsFixture` which explicitly states that the gtest parameter can be only an `ArgVector`. This is a limitation when we want to create tests which may have different parameters. E.g. we would like to create tests where we can combine different test parameters. So, for example we'd like gtest to be able to provide parameters of `<std::tuple<ArgVector, const char *>` instead of a simple `ArgVector`. Reviewers: a_sidorin, shafik, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Differential Revision: https://reviews.llvm.org/D57322 llvm-svn: 353425
* [clang-format] Fix breaking of qualified operatorKrasimir Georgiev2019-02-041-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: From https://bugs.llvm.org/show_bug.cgi?id=40516 ``` $ cat a.cpp const NamespaceName::VeryLongClassName &NamespaceName::VeryLongClassName::myFunction() { // do stuff } const NamespaceName::VeryLongClassName &NamespaceName::VeryLongClassName::operator++() { // do stuff } $ ~/ll/build/opt/bin/clang-format -style=LLVM a.cpp const NamespaceName::VeryLongClassName & NamespaceName::VeryLongClassName::myFunction() { // do stuff } const NamespaceName::VeryLongClassName &NamespaceName::VeryLongClassName:: operator++() { // do stuff } ``` What was happening is that the split penalty before `operator` was being set to a smaller value by a prior if block. Moved checks around to fix this and added a regression test. Reviewers: djasper Reviewed By: djasper Tags: #clang Differential Revision: https://reviews.llvm.org/D57604 llvm-svn: 353033
* [ASTImporter] Fix up test that only works on X86.David Green2019-02-021-3/+7
| | | | | | | | The test will fail if the default target triple is not X86, even if the host platform is. So move the check into the test at runtime. llvm-svn: 352956
* [CUDA] add support for the new kernel launch API in CUDA-9.2+.Artem Belevich2019-01-311-1/+3
| | | | | | | | | | | | | Instead of calling CUDA runtime to arrange function arguments, the new API constructs arguments in a local array and the kernels are launched with __cudaLaunchKernel(). The old API has been deprecated and is expected to go away in the next CUDA release. Differential Revision: https://reviews.llvm.org/D57488 llvm-svn: 352799
OpenPOWER on IntegriCloud