[all-commits] [llvm/llvm-project] 01f938: [analyzer] Handle `\l` symbol in string literals i...

Denys Petrov via All-commits all-commits at lists.llvm.org
Mon Jun 22 03:44:49 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 01f9388d95aca2cc86ed6b2794e199ef55d16e91
      https://github.com/llvm/llvm-project/commit/01f9388d95aca2cc86ed6b2794e199ef55d16e91
  Author: Denys Petrov <dpetrov at accesssoftek.com>
  Date:   2020-06-22 (Mon, 22 Jun 2020)

  Changed paths:
    A clang/test/Analysis/exploded-graph-rewriter/l_name_starts_with_l.cpp
    M clang/utils/analyzer/exploded-graph-rewriter.py

  Log Message:
  -----------
  [analyzer] Handle `\l` symbol in string literals in exploded-graph-rewriter

Summary:
Handle `\l` separately because a string literal can be in code like "string\\literal" with the `\l` inside. Also on Windows macros __FILE__ produces specific delimiters `\` and a directory or file may starts with the letter `l`.

Fix:
Use regex for replacing all `\l` (like `,\l`, `}\l`, `[\l`) except `\\l`, because a literal as a rule contains multiple `\` before `\l`.

Differential Revision: https://reviews.llvm.org/D82092




More information about the All-commits mailing list