[Lldb-commits] [lldb] r359931 - Fixed some minor style issues in rLLDB359921 [NFC]
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Fri May 3 14:01:45 PDT 2019
Author: teemperor
Date: Fri May 3 14:01:45 2019
New Revision: 359931
URL: http://llvm.org/viewvc/llvm-project?rev=359931&view=rev
Log:
Fixed some minor style issues in rLLDB359921 [NFC]
Ran clang-format on the added test file and use the new StringRef
comparison over the temporary ConstStrings. Also aligned the
end of one of the code string literals.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/main.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/main.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/main.cpp?rev=359931&r1=359930&r2=359931&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/main.cpp (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/main.cpp Fri May 3 14:01:45 2019
@@ -1,21 +1,21 @@
namespace error {
- int x;
+int x;
}
struct A {
void foo() {
- int error=1;
+ int error = 1;
return; // break here
}
};
int main() {
- int error=1;
+ int error = 1;
- A a;
+ A a;
- a.foo();
+ a.foo();
- return 0; // break here
+ return 0; // break here
}
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp?rev=359931&r1=359930&r2=359931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp Fri May 3 14:01:45 2019
@@ -210,18 +210,18 @@ static void AddLocalVariableDecls(const
// We can check for .block_descriptor w/o checking for langauge since this
// is not a valid identifier in either C or C++.
- if (!var_name || var_name == ConstString(".block_descriptor"))
+ if (!var_name || var_name == ".block_descriptor")
continue;
if (!expr.empty() && !ExprBodyContainsVar(expr, var_name.GetStringRef()))
continue;
- if ((var_name == ConstString("self") || var_name == ConstString("_cmd")) &&
+ if ((var_name == "self" || var_name == "_cmd") &&
(wrapping_language == lldb::eLanguageTypeObjC ||
wrapping_language == lldb::eLanguageTypeObjC_plus_plus))
continue;
- if (var_name == ConstString("this") &&
+ if (var_name == "this" &&
wrapping_language == lldb::eLanguageTypeC_plus_plus)
continue;
@@ -405,7 +405,7 @@ bool ClangExpressionSourceCode::GetText(
"@implementation $__lldb_objc_class ($__lldb_category) \n"
"-(void)%s:(void *)$__lldb_arg \n"
"{ \n"
- " %s; \n"
+ " %s; \n"
"%s"
"} \n"
"@end \n",
More information about the lldb-commits
mailing list