r190705 - ASTContext.cpp: Fix a warning in r190684. [-Wcovered-switch-default]
David Blaikie
dblaikie at gmail.com
Fri Sep 13 11:06:45 PDT 2013
On Fri, Sep 13, 2013 at 10:12 AM, NAKAMURA Takumi <geek4civic at gmail.com>wrote:
> Author: chapuni
> Date: Fri Sep 13 12:12:09 2013
> New Revision: 190705
>
> URL: http://llvm.org/viewvc/llvm-project?rev=190705&view=rev
> Log:
> ASTContext.cpp: Fix a warning in r190684. [-Wcovered-switch-default]
>
> Modified:
> cfe/trunk/lib/AST/ASTContext.cpp
>
> Modified: cfe/trunk/lib/AST/ASTContext.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=190705&r1=190704&r2=190705&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/AST/ASTContext.cpp (original)
> +++ cfe/trunk/lib/AST/ASTContext.cpp Fri Sep 13 12:12:09 2013
> @@ -698,7 +698,6 @@ static const LangAS::Map *getAddressSpac
> static bool isAddrSpaceMapManglingEnabled(const TargetInfo &TI,
> const LangOptions &LangOpts) {
> switch (LangOpts.getAddressSpaceMapMangling()) {
> - default: return false;
> case LangOptions::ASMM_Target:
> return TI.useAddressSpaceMapMangling();
> case LangOptions::ASMM_On:
> @@ -706,6 +705,8 @@ static bool isAddrSpaceMapManglingEnable
> case LangOptions::ASMM_Off:
> return false;
> }
> + llvm_unreachable("getAddressSpaceMapMangling() doesn't cover
> anything.");
> + return false;
>
Could you drop the return after unreachable? We don't usually do that.
> }
>
> ASTContext::ASTContext(LangOptions& LOpts, SourceManager &SM,
>
>
> _______________________________________________
> 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/20130913/fc299db6/attachment.html>
More information about the cfe-commits
mailing list