r235162 - clang-format: Add default fallback style.
Daniel Jasper
djasper at google.com
Fri Apr 17 00:59:19 PDT 2015
Author: djasper
Date: Fri Apr 17 02:59:19 2015
New Revision: 235162
URL: http://llvm.org/viewvc/llvm-project?rev=235162&view=rev
Log:
clang-format: Add default fallback style.
Thanks to Michael Schlottke.
Modified:
cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
cfe/trunk/tools/clang-format/clang-format.py
Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=235162&r1=235161&r2=235162&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Fri Apr 17 02:59:19 2015
@@ -3364,7 +3364,7 @@ namespace {
searchForID(M, SearchDecls[I]);
// FIXME: If none of the SearchDecls had local IDs in this module, can
// we avoid searching any ancestor module files?
- return false;
+ return Deserialized.empty();
}
ArrayRef<Decl *> getChain() const {
Modified: cfe/trunk/tools/clang-format/clang-format.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format.py?rev=235162&r1=235161&r2=235162&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/clang-format.py (original)
+++ cfe/trunk/tools/clang-format/clang-format.py Fri Apr 17 02:59:19 2015
@@ -34,6 +34,7 @@ if vim.eval('exists("g:clang_format_path
# a '.clang-format' or '_clang-format' file to indicate the style that should be
# used.
style = 'file'
+fallback_style = None
if vim.eval('exists("g:clang_format_fallback_style")') == "1":
fallback_style = vim.eval('g:clang_format_fallback_style')
More information about the cfe-commits
mailing list