forked from GPUOpen-Drivers/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged master:9ed681f9261 into amd-gfx:999cf270203
Local branch amd-gfx 999cf27 Merged master:a38396939c5 into amd-gfx:763ce7cebd8 Remote branch master 9ed681f gn build: Merge 6d5c273
- Loading branch information
Showing
61 changed files
with
1,699 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
clang/unittests/Tooling/RecursiveASTVisitorTests/MemberPointerTypeLoc.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
//===- unittest/Tooling/RecursiveASTVisitorTests/MemberPointerTypeLoc.cpp -===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "TestVisitor.h" | ||
|
||
using namespace clang; | ||
|
||
namespace { | ||
|
||
class MemberPointerTypeLocVisitor | ||
: public ExpectedLocationVisitor<MemberPointerTypeLocVisitor> { | ||
public: | ||
bool VisitTemplateTypeParmTypeLoc(TemplateTypeParmTypeLoc TL) { | ||
if (!TL) | ||
return true; | ||
Match(TL.getDecl()->getName(), TL.getNameLoc()); | ||
return true; | ||
} | ||
bool VisitRecordTypeLoc(RecordTypeLoc RTL) { | ||
if (!RTL) | ||
return true; | ||
Match(RTL.getDecl()->getName(), RTL.getNameLoc()); | ||
return true; | ||
} | ||
}; | ||
|
||
TEST(RecursiveASTVisitor, VisitTypeLocInMemberPointerTypeLoc) { | ||
MemberPointerTypeLocVisitor Visitor; | ||
Visitor.ExpectMatch("Bar", 4, 36); | ||
Visitor.ExpectMatch("T", 7, 23); | ||
EXPECT_TRUE(Visitor.runOver(R"cpp( | ||
class Bar { void func(int); }; | ||
class Foo { | ||
void bind(const char*, void(Bar::*Foo)(int)) {} | ||
template<typename T> | ||
void test(void(T::*Foo)()); | ||
}; | ||
)cpp")); | ||
} | ||
|
||
TEST(RecursiveASTVisitor, NoCrash) { | ||
MemberPointerTypeLocVisitor Visitor; | ||
EXPECT_FALSE(Visitor.runOver(R"cpp( | ||
// MemberPointerTypeLoc.getClassTInfo() is null. | ||
class a(b(a::*)) class | ||
)cpp")); | ||
} | ||
|
||
} // end anonymous namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CXX_SOURCES := main.cpp | ||
include Makefile.rules |
Oops, something went wrong.