summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/index/SymbolCollector.cpp
diff options
context:
space:
mode:
authorNathan Ridge <zeratul976@hotmail.com>2019-05-30 23:54:43 +0000
committerNathan Ridge <zeratul976@hotmail.com>2019-05-30 23:54:43 +0000
commitb2f45ac299509c46ed5b41c263a1e834c49bed29 (patch)
tree394cb426f2d83303d2712041dd617c20d0b61a86 /clang-tools-extra/clangd/index/SymbolCollector.cpp
parent70dc2200a2de2f69d95777e1c33e2fbb28d998f2 (diff)
downloadbcm5719-llvm-b2f45ac299509c46ed5b41c263a1e834c49bed29.tar.gz
bcm5719-llvm-b2f45ac299509c46ed5b41c263a1e834c49bed29.zip
[clangd] clang-format SymbolCollector.cpp
llvm-svn: 362176
Diffstat (limited to 'clang-tools-extra/clangd/index/SymbolCollector.cpp')
-rw-r--r--clang-tools-extra/clangd/index/SymbolCollector.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang-tools-extra/clangd/index/SymbolCollector.cpp b/clang-tools-extra/clangd/index/SymbolCollector.cpp
index af1938dafa8..507d0ea6ba6 100644
--- a/clang-tools-extra/clangd/index/SymbolCollector.cpp
+++ b/clang-tools-extra/clangd/index/SymbolCollector.cpp
@@ -416,8 +416,7 @@ bool SymbolCollector::handleMacroOccurence(const IdentifierInfo *Name,
return true;
}
-void SymbolCollector::setIncludeLocation(const Symbol &S,
- SourceLocation Loc) {
+void SymbolCollector::setIncludeLocation(const Symbol &S, SourceLocation Loc) {
if (Opts.CollectIncludePath)
if (shouldCollectIncludePath(S.SymInfo.Kind))
// Use the expansion location to get the #include header since this is
@@ -681,7 +680,7 @@ static bool isErrorAboutInclude(llvm::StringRef Line) {
if (!Line.consume_front("#"))
return false;
Line = Line.ltrim();
- if (! Line.startswith("error"))
+ if (!Line.startswith("error"))
return false;
return Line.contains_lower("includ"); // Matches "include" or "including".
}
@@ -689,7 +688,7 @@ static bool isErrorAboutInclude(llvm::StringRef Line) {
bool SymbolCollector::isDontIncludeMeHeader(llvm::StringRef Content) {
llvm::StringRef Line;
// Only sniff up to 100 lines or 10KB.
- Content = Content.take_front(100*100);
+ Content = Content.take_front(100 * 100);
for (unsigned I = 0; I < 100 && !Content.empty(); ++I) {
std::tie(Line, Content) = Content.split('\n');
if (isIf(Line) && isErrorAboutInclude(Content.split('\n').first))
OpenPOWER on IntegriCloud