r221567 - Fix unintended fallthrough in ASTReader

Ben Langmuir blangmuir at apple.com
Tue Nov 11 17:23:34 PST 2014


> On Nov 11, 2014, at 5:03 PM, David Blaikie <dblaikie at gmail.com> wrote:
> 
> 
> 
> On Fri, Nov 7, 2014 at 4:06 PM, Ben Langmuir <blangmuir at apple.com <mailto:blangmuir at apple.com>> wrote:
> Author: benlangmuir
> Date: Fri Nov  7 18:06:39 2014
> New Revision: 221567
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=221567&view=rev <http://llvm.org/viewvc/llvm-project?rev=221567&view=rev>
> Log:
> Fix unintended fallthrough in ASTReader
> 
> Is this tested?

No, because there’s no change in behaviour.  The garbage data we read in the unintended fallthrough happens to get replaced with the correct data later because of the order we read the blocks.

Thanks for checking :-)

Ben

>  
> 
> Modified:
>     cfe/trunk/lib/Serialization/ASTReader.cpp
> 
> Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=221567&r1=221566&r2=221567&view=diff <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=221567&r1=221566&r2=221567&view=diff>
> ==============================================================================
> --- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
> +++ cfe/trunk/lib/Serialization/ASTReader.cpp Fri Nov  7 18:06:39 2014
> @@ -2522,6 +2522,8 @@ ASTReader::ReadControlBlock(ModuleFile &
>        if (ASTReadResult Result =
>                ReadModuleMapFileBlock(Record, F, ImportedBy, ClientLoadCapabilities))
>          return Result;
> +      break;
> +
>      case INPUT_FILE_OFFSETS:
>        NumInputs = Record[0];
>        NumUserInputs = Record[1];
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu <mailto:cfe-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits <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/20141111/ecc01fd0/attachment.html>


More information about the cfe-commits mailing list