[cfe-commits] r157114 - in /cfe/trunk: include/clang/Sema/DeclSpec.h lib/Sema/DeclSpec.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat May 19 07:28:31 PDT 2012
Author: d0k
Date: Sat May 19 09:28:31 2012
New Revision: 157114
URL: http://llvm.org/viewvc/llvm-project?rev=157114&view=rev
Log:
Inline a trivial clear() method.
Modified:
cfe/trunk/include/clang/Sema/DeclSpec.h
cfe/trunk/lib/Sema/DeclSpec.cpp
Modified: cfe/trunk/include/clang/Sema/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/DeclSpec.h?rev=157114&r1=157113&r2=157114&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/DeclSpec.h (original)
+++ cfe/trunk/include/clang/Sema/DeclSpec.h Sat May 19 09:28:31 2012
@@ -853,12 +853,14 @@
assert(Other.Kind == IK_Identifier && "Cannot copy non-identifiers");
}
- /// \brief Destroy this unqualified-id.
- ~UnqualifiedId() { clear(); }
-
/// \brief Clear out this unqualified-id, setting it to default (invalid)
/// state.
- void clear();
+ void clear() {
+ Kind = IK_Identifier;
+ Identifier = 0;
+ StartLocation = SourceLocation();
+ EndLocation = SourceLocation();
+ }
/// \brief Determine whether this unqualified-id refers to a valid name.
bool isValid() const { return StartLocation.isValid(); }
Modified: cfe/trunk/lib/Sema/DeclSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/DeclSpec.cpp?rev=157114&r1=157113&r2=157114&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/DeclSpec.cpp (original)
+++ cfe/trunk/lib/Sema/DeclSpec.cpp Sat May 19 09:28:31 2012
@@ -935,13 +935,6 @@
StorageClassSpec != DeclSpec::SCS_typedef;
}
-void UnqualifiedId::clear() {
- Kind = IK_Identifier;
- Identifier = 0;
- StartLocation = SourceLocation();
- EndLocation = SourceLocation();
-}
-
void UnqualifiedId::setOperatorFunctionId(SourceLocation OperatorLoc,
OverloadedOperatorKind Op,
SourceLocation SymbolLocations[3]) {
More information about the cfe-commits
mailing list