Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang-tools-extra/clangd/SourceCode.h
Show First 20 Lines • Show All 327 Lines • ▼ Show 20 Lines | |||||
/// Returns true if Name is reserved, like _Foo or __Vector_base. | /// Returns true if Name is reserved, like _Foo or __Vector_base. | ||||
inline bool isReservedName(llvm::StringRef Name) { | inline bool isReservedName(llvm::StringRef Name) { | ||||
// This doesn't catch all cases, but the most common. | // This doesn't catch all cases, but the most common. | ||||
return Name.size() >= 2 && Name[0] == '_' && | return Name.size() >= 2 && Name[0] == '_' && | ||||
(isUppercase(Name[1]) || Name[1] == '_'); | (isUppercase(Name[1]) || Name[1] == '_'); | ||||
} | } | ||||
/// Translates locations inside preamble patch to their main-file equivalent | |||||
/// using presumed locations. Returns \p Loc if it isn't inside preamble patch. | |||||
SourceLocation translatePreamblePatchLocation(SourceLocation Loc, | |||||
const SourceManager &SM); | |||||
} // namespace clangd | } // namespace clangd | ||||
} // namespace clang | } // namespace clang | ||||
#endif | #endif |