r175701 - Strip 'llvm' from 'llvm::Optional' uses.
David Blaikie
dblaikie at gmail.com
Wed Feb 20 17:35:17 PST 2013
On Wed, Feb 20, 2013 at 5:29 PM, Ted Kremenek <kremenek at apple.com> wrote:
> Author: kremenek
> Date: Wed Feb 20 19:29:01 2013
> New Revision: 175701
>
> URL: http://llvm.org/viewvc/llvm-project?rev=175701&view=rev
> Log:
> Strip 'llvm' from 'llvm::Optional' uses.
>
Thanks Ted - I often miss tools when I do these things (sed over *.h/*.cpp
in include/lib is my usual approach & I forget tools).
- David
>
> Modified:
> cfe/trunk/tools/libclang/CIndex.cpp
> cfe/trunk/tools/libclang/CursorVisitor.h
> cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
>
> Modified: cfe/trunk/tools/libclang/CIndex.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=175701&r1=175700&r2=175701&view=diff
>
> ==============================================================================
> --- cfe/trunk/tools/libclang/CIndex.cpp (original)
> +++ cfe/trunk/tools/libclang/CIndex.cpp Wed Feb 20 19:29:01 2013
> @@ -557,16 +557,16 @@ bool CursorVisitor::VisitBlockDecl(Block
> return false;
> }
>
> -llvm::Optional<bool> CursorVisitor::shouldVisitCursor(CXCursor Cursor) {
> +Optional<bool> CursorVisitor::shouldVisitCursor(CXCursor Cursor) {
> if (RegionOfInterest.isValid()) {
> SourceRange Range = getFullCursorExtent(Cursor,
> AU->getSourceManager());
> if (Range.isInvalid())
> - return llvm::Optional<bool>();
> + return Optional<bool>();
>
> switch (CompareRegionOfInterest(Range)) {
> case RangeBefore:
> // This declaration comes before the region of interest; skip it.
> - return llvm::Optional<bool>();
> + return Optional<bool>();
>
> case RangeAfter:
> // This declaration comes after the region of interest; we're done.
> @@ -617,7 +617,7 @@ bool CursorVisitor::VisitDeclContext(Dec
> Cursor = MakeCursorObjCProtocolRef(PD, PD->getLocation(), TU);
> }
>
> - const llvm::Optional<bool> &V = shouldVisitCursor(Cursor);
> + const Optional<bool> &V = shouldVisitCursor(Cursor);
> if (!V.hasValue())
> continue;
> if (!V.getValue())
> @@ -981,7 +981,7 @@ bool CursorVisitor::VisitObjCContainerDe
> for (SmallVectorImpl<Decl*>::iterator I = DeclsInContainer.begin(),
> E = DeclsInContainer.end(); I != E; ++I) {
> CXCursor Cursor = MakeCXCursor(*I, TU, RegionOfInterest);
> - const llvm::Optional<bool> &V = shouldVisitCursor(Cursor);
> + const Optional<bool> &V = shouldVisitCursor(Cursor);
> if (!V.hasValue())
> continue;
> if (!V.getValue())
> @@ -5741,12 +5741,12 @@ static CXVersion convertVersion(VersionT
>
> Out.Major = In.getMajor();
>
> - if (llvm::Optional<unsigned> Minor = In.getMinor())
> + if (Optional<unsigned> Minor = In.getMinor())
> Out.Minor = *Minor;
> else
> return Out;
>
> - if (llvm::Optional<unsigned> Subminor = In.getSubminor())
> + if (Optional<unsigned> Subminor = In.getSubminor())
> Out.Subminor = *Subminor;
>
> return Out;
>
> Modified: cfe/trunk/tools/libclang/CursorVisitor.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CursorVisitor.h?rev=175701&r1=175700&r2=175701&view=diff
>
> ==============================================================================
> --- cfe/trunk/tools/libclang/CursorVisitor.h (original)
> +++ cfe/trunk/tools/libclang/CursorVisitor.h Wed Feb 20 19:29:01 2013
> @@ -199,7 +199,7 @@ public:
> bool VisitAttributes(Decl *D);
> bool VisitBlockDecl(BlockDecl *B);
> bool VisitCXXRecordDecl(CXXRecordDecl *D);
> - llvm::Optional<bool> shouldVisitCursor(CXCursor C);
> + Optional<bool> shouldVisitCursor(CXCursor C);
> bool VisitDeclContext(DeclContext *DC);
> bool VisitTranslationUnitDecl(TranslationUnitDecl *D);
> bool VisitTypedefDecl(TypedefDecl *D);
>
> Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp?rev=175701&r1=175700&r2=175701&view=diff
>
> ==============================================================================
> --- cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp (original)
> +++ cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Wed Feb 20
> 19:29:01 2013
> @@ -291,7 +291,7 @@ typedef llvm::PointerUnion<RecordVec*, R
> namespace {
> class InferPedantic {
> typedef llvm::DenseMap<const Record*,
> - std::pair<unsigned, llvm::Optional<unsigned> > >
> GMap;
> + std::pair<unsigned, Optional<unsigned> > > GMap;
>
> DiagGroupParentMap &DiagGroupParents;
> const std::vector<Record*> &Diags;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130220/85958acb/attachment.html>
More information about the cfe-commits
mailing list