Skip to content

Commit

Permalink
Overwritten with: a77b6e9 Merged master:1454018dc1d9 into amd-gfx:3fd…
Browse files Browse the repository at this point in the history
…59da059f0

Based on upstream llvm : 1454018 Revert "[libc++] Use CMake interface targets to setup benchmark flags"

This reverts back to the previous version from Aug 20th, as the Sep 2nd
version causes multiple CTS failures.

Added AMD modification notices and removed some GPL files.

Change-Id: Ic219f7e21fa1c494b12944205b305ae6d4cfda02
  • Loading branch information
trenouf committed Sep 2, 2020
2 parents 1826337 + a77b6e9 commit c72fe64
Show file tree
Hide file tree
Showing 4,041 changed files with 75,869 additions and 214,866 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
22 changes: 10 additions & 12 deletions clang-tools-extra/clang-query/tool/ClangQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,33 +110,31 @@ int main(int argc, const char **argv) {
ClangTool Tool(OptionsParser->getCompilations(),
OptionsParser->getSourcePathList());
std::vector<std::unique_ptr<ASTUnit>> ASTs;
int Status = Tool.buildASTs(ASTs);
int ASTStatus = 0;
switch (Tool.buildASTs(ASTs)) {
case 0:
break;
case 1: // Building ASTs failed.
if (Status == 1) {
// Building ASTs failed.
return 1;
case 2:
} else if (Status == 2) {
ASTStatus |= 1;
llvm::errs() << "Failed to build AST for some of the files, "
<< "results may be incomplete."
<< "\n";
break;
default:
llvm_unreachable("Unexpected status returned");
} else {
assert(Status == 0 && "Unexpected status returned");
}

QuerySession QS(ASTs);

if (!Commands.empty()) {
for (auto &Command : Commands) {
QueryRef Q = QueryParser::parse(Command, QS);
for (auto I = Commands.begin(), E = Commands.end(); I != E; ++I) {
QueryRef Q = QueryParser::parse(*I, QS);
if (!Q->run(llvm::outs(), QS))
return 1;
}
} else if (!CommandFiles.empty()) {
for (auto &CommandFile : CommandFiles) {
if (runCommandsInFile(argv[0], CommandFile, QS))
for (auto I = CommandFiles.begin(), E = CommandFiles.end(); I != E; ++I) {
if (runCommandsInFile(argv[0], *I, QS))
return 1;
}
} else {
Expand Down
20 changes: 8 additions & 12 deletions clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,14 @@ AST_POLYMORPHIC_MATCHER(
if (PrefixPosition == StringRef::npos)
return false;
Path = Path.drop_front(PrefixPosition + AbslPrefix.size());
static const char *AbseilLibraries[] = {"algorithm", "base",
"container", "debugging",
"flags", "hash",
"iterator", "memory",
"meta", "numeric",
"random", "status",
"strings", "synchronization",
"time", "types",
"utility"};
return llvm::any_of(AbseilLibraries, [&](const char *Library) {
return Path.startswith(Library);
});
static const char *AbseilLibraries[] = {
"algorithm", "base", "container", "debugging", "flags",
"hash", "iterator", "memory", "meta", "numeric",
"random", "strings", "synchronization", "status", "time",
"types", "utility"};
return std::any_of(
std::begin(AbseilLibraries), std::end(AbseilLibraries),
[&](const char *Library) { return Path.startswith(Library); });
}

} // namespace ast_matchers
Expand Down
3 changes: 0 additions & 3 deletions clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "NotNullTerminatedResultCheck.h"
#include "ParentVirtualCallCheck.h"
#include "PosixReturnCheck.h"
#include "RedundantBranchConditionCheck.h"
#include "ReservedIdentifierCheck.h"
#include "SignedCharMisuseCheck.h"
#include "SizeofContainerCheck.h"
Expand Down Expand Up @@ -120,8 +119,6 @@ class BugproneModule : public ClangTidyModule {
"bugprone-move-forwarding-reference");
CheckFactories.registerCheck<MultipleStatementMacroCheck>(
"bugprone-multiple-statement-macro");
CheckFactories.registerCheck<RedundantBranchConditionCheck>(
"bugprone-redundant-branch-condition");
CheckFactories.registerCheck<cppcoreguidelines::NarrowingConversionsCheck>(
"bugprone-narrowing-conversions");
CheckFactories.registerCheck<NoEscapeCheck>("bugprone-no-escape");
Expand Down
1 change: 0 additions & 1 deletion clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ add_clang_library(clangTidyBugproneModule
NotNullTerminatedResultCheck.cpp
ParentVirtualCallCheck.cpp
PosixReturnCheck.cpp
RedundantBranchConditionCheck.cpp
ReservedIdentifierCheck.cpp
SignedCharMisuseCheck.cpp
SizeofContainerCheck.cpp
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ add_clang_library(clangTidyCppCoreGuidelinesModule
NarrowingConversionsCheck.cpp
NoMallocCheck.cpp
OwningMemoryCheck.cpp
PreferMemberInitializerCheck.cpp
ProBoundsArrayToPointerDecayCheck.cpp
ProBoundsConstantArrayIndexCheck.cpp
ProBoundsPointerArithmeticCheck.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "NarrowingConversionsCheck.h"
#include "NoMallocCheck.h"
#include "OwningMemoryCheck.h"
#include "PreferMemberInitializerCheck.h"
#include "ProBoundsArrayToPointerDecayCheck.h"
#include "ProBoundsConstantArrayIndexCheck.h"
#include "ProBoundsPointerArithmeticCheck.h"
Expand Down Expand Up @@ -67,8 +66,6 @@ class CppCoreGuidelinesModule : public ClangTidyModule {
"cppcoreguidelines-non-private-member-variables-in-classes");
CheckFactories.registerCheck<OwningMemoryCheck>(
"cppcoreguidelines-owning-memory");
CheckFactories.registerCheck<PreferMemberInitializerCheck>(
"cppcoreguidelines-prefer-member-initializer");
CheckFactories.registerCheck<ProBoundsArrayToPointerDecayCheck>(
"cppcoreguidelines-pro-bounds-array-to-pointer-decay");
CheckFactories.registerCheck<ProBoundsConstantArrayIndexCheck>(
Expand Down
Loading

0 comments on commit c72fe64

Please sign in to comment.