[PATCH] D27464: Use the fallible llvm::Regex constructor in Clang.

David L. Jones via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 08:40:37 PST 2016


dlj created this revision.
dlj added reviewers: rsmith, llvm-commits.
dlj added a subscriber: klimek.

This change updates Clang to check for an llvm::Expected<llvm::Regex>, instead
of constructing an invalid Regex and checking .isValid().

Since most of the uses already (silently) ignore invalid llvm::Regex objects,
I've not tried too hard to propagate construction-time errors.


https://reviews.llvm.org/D27464

Files:
  include/clang/ASTMatchers/ASTMatchers.h
  lib/Driver/Multilib.cpp
  lib/Format/ContinuationIndenter.cpp
  lib/Format/Format.cpp
  lib/Format/FormatTokenLexer.cpp
  lib/Frontend/CompilerInvocation.cpp
  lib/Frontend/VerifyDiagnosticConsumer.cpp
  tools/driver/driver.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27464.80427.patch
Type: text/x-patch
Size: 10022 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161206/4ce25413/attachment.bin>


More information about the llvm-commits mailing list